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

Why is part freezing in place once it gets welded to the player's lower leg or foot?

I have been making a game that requires players to wear a full body suit that gets welded to their body. I made a script & everything works fine until I get to any of the parts that are meant to be welded to the players lower legs, whenever one of them gets welded it just freezes on the players leg & stops them from moving. I used the same script on every part, the only difference is the target parts so I don't know why these ones aren't working.

Here is the code:

script.Parent.Touched:Connect(function(hit)
	humanoid = hit.Parent:findFirstChild("Humanoid")
	if humanoid then
		if script.Parent:FindFirstChild("weld") == nil then
			rightLowerLeg = hit.Parent.RightLowerLeg
			script.Parent.CFrame = rightLowerLeg.CFrame * CFrame.new(0, -0.3155, 0)
			weld = Instance.new("Weld")
			weld.Part0 = rightLowerLeg
			weld.C0 = rightLowerLeg.CFrame:Inverse()
			weld.Part1 = script.Parent
			weld.C1 = script.Parent.CFrame:Inverse()
			weld.Parent = script.Parent
			weld.Parent.Anchored = false
		end
	end
end)

I have also tried welding them to the player's foot but it still does the same thing. I have made sure that it isn't anchored before AND after the script has run.

1 answer

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