Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why is welding an object to the players lower leg stopping them from movement?

Asked by 6 years ago

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:

01function WeldEnable (x, y, z)
02    if Prt1:FindFirstChild("weld") == nil then
03        Prt1.CFrame = Prt0.CFrame * CFrame.new(x, y, z)
04        weld = Instance.new("Weld")
05        weld.Part0 = Prt0
06        weld.C0 = Prt0.CFrame:Inverse()
07        weld.Part1 = Prt1
08        weld.C1 = Prt1.CFrame:Inverse()
09        weld.Parent = Prt1
10        weld.Parent.Anchored = false
11    end
12end
13 
14if script.Parent:FindFirstChild("weld") == nil then
15end
View all 25 lines...
0
make sure the part's "Cancollide" feature is off........... or false Tizzel40 243 — 6y
0
Same with anchored ^ Nikkulaos 229 — 6y
0
I just tried turning off CanCollide & I already made sure that it is not anchored but it still doesn't work, & It only doesn't work for the foot/lower leg CoolOlivie057 45 — 6y
0
I just did some testing & it turns out that it is the part that is freezing, I raised the weld higher & disconnected it & it freezed in place! But I checked the part but it wasn't anchored CoolOlivie057 45 — 6y

Answer this question