Can someone Help with this welding script?
I got the actual welding part down, but how do i make it so the player can move with the part welded to them. This is all done when the player hits a key while the tool is equipped.
03 | player = game.Players.LocalPlayer |
05 | tool.Equipped:connect( function (mouse) |
06 | mouse.KeyDown:connect( function (key) |
07 | if stat = = "undone" then |
11 | local head = script.Parent.Parent.Head |
12 | local part = Instance.new( "Part" ) |
13 | part.Parent = game.Workspace |
14 | local w = Instance.new( "Weld" ) |
15 | part.CanCollide = false |
17 | w.C 0 = head.CFrame:inverse() |
19 | w.C 1 = part.CFrame:inverse() |
20 | part.CFrame = head.CFrame * CFrame.new( 0 , 15 , 0 ) |
So far the actual part goes in the proper position but the player cannot move.