#Weird hitbox bug

1 messages · Page 1 of 1 (latest)

split meadow
#

The hitbox is a union of 3 parts.
This is the code i use to create hitboxes:

    hitboxClone.Name = "Hitbox"

    hitboxClone.CFrame = char:WaitForChild("HumanoidRootPart").CFrame * CFrame.new(0,0,-2.5)
    hitboxClone.Parent = workspace.Hitboxes```
Any fix?
-# btw im new at this, and i mostly don't understand CFrames, and i think that's probably the bug
#

also im talking abt the 2nd hitbox, the first one is fine

lean granite
split meadow
#

and why is it so rotated?

#

as in

#

it's sideways

#

or how can i fix that

lean granite
#

So to fix this you'd have to rotate the HitboxClone accordingly. An example would be this:


HitboxClone.CFrame = CFrame.new(HitboxClone.CFrame.Position) * CFrame.Angles(math.rad(0), math.rad(90), math.rad(0))

split meadow
#

lemme try

primal notchBOT
#

studio** You are now Level 3! **studio

lean granite
lean granite
split meadow
#

did i have to do this?

    hitboxClone.CFrame = CFrame.new(hitboxClone.CFrame.Position) * CFrame.Angles(math.rad(0),math.rad(90), math.rad(0))```
split meadow
lean granite
#

´Nvm i did a mistake

split meadow
#

np

lean granite
#

Its ```lua
hitboxClone.CFrame *= CFrame.Angles(math.rad(0),math.rad(90), math.rad(0))

split meadow
#

ok

#

lemme try now

#

yeah works fine now ty