RopeConstraint wont work with Character, why?
I made this rope swinging script, using rope constraints. But whenever I shoot the rope I get stuck midair, unable to move. I have no idea why. Any help please?
03 | local players = game:GetService( "Players" ) |
04 | local plr = players.LocalPlayer |
06 | local char = plr.Character |
07 | local head = char:FindFirstChild( "Head" ) |
09 | local athA = Instance.new( "Attachment" ) |
10 | local athPart = game.Workspace.AttachPart |
11 | local athB = Instance.new( "Attachment" ) |
13 | athA.Position = Vector 3. new( 0 , 0 ,- 1 ) |
16 | local uis = game:GetService( "UserInputService" ) |
21 | uis.InputBegan:Connect( function (key) |
22 | if key.KeyCode = = Enum.KeyCode.R then |
23 | if isSwinging = = false then |
25 | script.WebSound:Play() |
27 | rope = Instance.new( "RopeConstraint" ) |
28 | length = (head.Position - athPart.Position).magnitude |
29 | rope.Attachment 0 = athB |
30 | rope.Attachment 1 = athA |
39 | uis.InputEnded:Connect( function (key) |
40 | if key.KeyCode = = Enum.KeyCode.R then |
41 | if isSwinging = = true then |