So I made a slash effect for a move and the effect is welded to the hitbox but it still falls into the void?
Code for hitbox creation is down below
function createHitbox(player,size,duration,transparency)
local hitbox = Instance.new("Part")
hitbox.Parent = player.Character
hitbox.Name = "Hitbox"
hitbox.Anchored = false
hitbox.CanCollide = false
hitbox.Transparency = transparency
local hrp = player.Character:WaitForChild("HumanoidRootPart")
hitbox.Position = hrp.Position + hrp.CFrame.LookVector * 2
hitbox.Orientation = hrp.Orientation
local hitboxWeld = Instance.new("WeldConstraint")
hitboxWeld.Parent = player.Character
hitboxWeld.Name = "HitboxWeld"
hitboxWeld.Part0 = hitbox
hitboxWeld.Part1 = hrp
hitbox.Size = size
local slashClone = slash:Clone()
slashClone.Position = hitbox.Position
slashClone.Orientation = hitbox.Orientation
local slashWeld = Instance.new("WeldConstraint")
slashWeld.Part0 = hitbox
slashWeld.Part1 = slashClone
slashWeld.Name = "SlashWeld"
slashClone.Parent = workspace
task.wait(duration)
hitbox:Destroy()
hitboxWeld:Destroy()
slashClone:Destroy()
slashWeld:Destroy()
end