# Help with recreation of Altitortures rope system

Hey,

I have been trying to figure out for many days, how I can create a similar rope system like the one in the game Altitorture. All my attempts before have been complete failures but now I have gotten some kind of velocity system working. It Isn’t perfect at all and needs lots of improvements. I will provide videos of the current system and one of what it should look like. My current test code is also provided in the end of this post.

My current system:

What it is supposed to be like (Altitortures system):

My current code (This is only test code):

``````while task.wait() do
if script.Parent:FindFirstChild("HumanoidRootPart") then
local Part1 = script.Parent.HumanoidRootPart
local Part2 = workspace.Part

if not Part1:FindFirstChild("Rope") then
local Attachment = Instance.new("Attachment")
Attachment.Parent = Part1
Attachment.Name = "RopeAttachment"

local Rope = script.Rope:Clone()
Rope.Parent = Part1
Rope.Attachment0 = Attachment
Rope.Attachment1 = Part2.Attachment
end

local directionToPart2 = (Part2.Position - Part1.Position).Unit
local distanceToPart2 = (Part2.Position - Part1.Position).Magnitude

if distanceToPart2 >= 15 then
local nearestPointOnSurface = Part2.Position + directionToPart2 * (Part2.Size.X / 2)

if Part1.Position.Y <= 0 then
local velocity = Instance.new("BodyVelocity")
velocity.MaxForce = Vector3.new(6000, 10000, 6000)
velocity.Velocity = directionToPart2 * (200 * distanceToPart2)
velocity.Parent = Part1

velocity:Destroy()
else
local velocity = Instance.new("BodyVelocity")
velocity.MaxForce = Vector3.new(6000, distanceToPart2, 6000)
velocity.Velocity = directionToPart2 * (200 * distanceToPart2)
velocity.Parent = Part1

velocity:Destroy()
end
end
end
end
``````

The movement in altitorture appears to be an invisible spring constraint. Maybe try using a spring constraint and see if that works. You will likely need to fine tune the properties which can be difficult with springs.

1 Like

Thanks for bringing this up, I actually tried springs before but didn’t get it right. I will try again and let you know if I get it to work.

Seems to work, just need a few adjustments and it will work like the one in the game. Attaching players straight to the spring constraint is buggy and doesn’t work but I found a work around and got it to work.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.