i want to make a parkour game, but first off all i need to make rope mechanic. There will be a lot same named part that for rope and the certain part be close enough to player.
my code, its not working. How do i fix it? (i combined 3 diffirent codes from devforum):
local Part = game.woskpace.roper
local RootPart = game.Players.LocalPlayer.HumanoidRootPartprefer
local Distance = (Part.Position - Vector3.new(RootPart.Position.X,Part.Position.Y,RootPart.Position.Z)).Magnitude
huma= game.Players:FindFirstChild("Left Arm")
bri = script.Parent.Parent.Workspace.roper
local Player = game.Players.LocalPlayer
local Character = Player.Character
local UserInputService = game:GetService("UserInputService")
UserInputService.InputBegan:Connect(function(key)
if key.KeyCode == Enum.KeyCode.Q then
if Distance <= 23 then
if bri.RodConstraint.Attachment1 == bri.RodConstraint.Attachment0 then
bri.RodConstraint2.Attachment1 = huma.Rop2
bri.RodConstraint.Attachment1 = huma.Rop
else
bri.RodConstraint.Attachment1 = bri.RodConstraint.Attachment0
bri.RodConstraint2.Attachment1 = bri.RodConstraint2.Attachment0
end
end
end
end)

3 comments
theres some miss spellings and alot of errors
This code is just a mess, there are so many things wrong with it. Open output and go through each error and fix them individually, after you have fixed them to your ability, come back if it still doesn't work.
Okay thanks