Nothing is happening it should make a rope so the player can swing I need Help?
--// Services
local UserInput = game:GetService("UserInputService")
--// SwingPart
local SPart = script.Parent.Part
--// Animation
local hum = script.Parent.Humanoid
local SwingAnimation = script["Swing Animation"]
local SwingAnimationTrack = hum:LoadAnimation(SwingAnimation)
local ReleaseAnimation = script.ReleaseAnimation
local ReleaseAnimationTrack = hum:LoadAnimation(ReleaseAnimation)
--// Rope
local PlayerHand = script.Parent.LeftHand
--// KeyInput
UserInput.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.R then
Att0 = Instance.new("Attachment", SPart)
Att1 = Instance.new("Attachment", script.Parent.LeftHand)
Rope = Instance.new("RopeConstraint", script.Parent.LeftHand)
Rope.Attachment0 = Att0
Rope.Attachment1 = Att1
end
end)