Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

RightHand Hitbox gets stuck to the ground?

This hit box script that is supposed to weld to the player's right hand (r15), it works when i stay still on the spawnbox, but when i move around it gets stuck to game's workspace, any help?

--\\Create Hitbox
		local Hitbox = Instance.new("Part", game.Workspace)
		Hitbox.Size = Vector3.new(1, 1, 1)
		Hitbox.BrickColor = BrickColor.new("Bright red")
		Hitbox.Anchored = false
		Hitbox.CanCollide = false
		
		local Weld = Instance.new("Weld", Hitbox)
		Weld.Part0 = Hitbox
		Weld.Part1 = Character.RightHand
		Weld.C0 = Weld.C0 * CFrame.new(0, 0, 0)

1 comment

0

"stuck to game's workspace" What?

1 answer

✓ Accepted answer

That's because you made the parent apart of the workspace, make the parent of the part the player:

--\\Create Hitbox
        local Hitbox = Instance.new("Part", Character)
        Hitbox.Size = Vector3.new(1, 1, 1)
        Hitbox.BrickColor = BrickColor.new("Bright red")
        Hitbox.Anchored = false
        Hitbox.CanCollide = false

        local Weld = Instance.new("Weld", Hitbox)
        Weld.Part0 = Hitbox
        Weld.Part1 = Character.RightHand
        Weld.C0 = Weld.C0 * CFrame.new(0,

1 comment

0

Happy i helped :)

This discussion is preserved as it was. New answers, comments, and votes are closed.