So I am building a game which includes a full body suit that gets welded to the player, I have the parts & for testing I have made them weld themselves to the player when the player touches them. But when any of the parts that are meant to be attached to the player's lower leg get welded, the player stops moving. I have also tried welding the part to the players foot instead but the same problem happens
here is the code:
function WeldEnable (x, y, z) if Prt1:FindFirstChild("weld") == nil then Prt1.CFrame = Prt0.CFrame * CFrame.new(x, y, z) weld = Instance.new("Weld") weld.Part0 = Prt0 weld.C0 = Prt0.CFrame:Inverse() weld.Part1 = Prt1 weld.C1 = Prt1.CFrame:Inverse() weld.Parent = Prt1 weld.Parent.Anchored = false end end if script.Parent:FindFirstChild("weld") == nil then end script.Parent.Touched:Connect(function(hit) humanoid = hit.Parent:findFirstChild("Humanoid") if humanoid then Prt0 = hit.Parent.LeftLowerLeg Prt1 = script.Parent WeldEnable(0, -0.0965, 0) end end)