Why is welding an object to the players lower leg stopping them from movement?
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:
01 | function WeldEnable (x, y, z) |
02 | if Prt 1 :FindFirstChild( "weld" ) = = nil then |
03 | Prt 1. CFrame = Prt 0. CFrame * CFrame.new(x, y, z) |
04 | weld = Instance.new( "Weld" ) |
06 | weld.C 0 = Prt 0. CFrame:Inverse() |
08 | weld.C 1 = Prt 1. CFrame:Inverse() |
10 | weld.Parent.Anchored = false |
14 | if script.Parent:FindFirstChild( "weld" ) = = nil then |
16 | script.Parent.Touched:Connect( function (hit) |
17 | humanoid = hit.Parent:findFirstChild( "Humanoid" ) |
20 | Prt 0 = hit.Parent.LeftLowerLeg |
22 | WeldEnable( 0 , - 0.0965 , 0 ) |