Rope Swing Mechanic

The code used for this is actually really simple.
These aren’t custom ropes with custom CFramed physics, they’re RopeConstraint objects that take advantage of default Roblox physics and an added BodyForce for a kick.

These are the main lines of code that make everything work:


Creates ropes

(The pointOne.WorldPosition line could be shortened to pointOne.WorldPosition = grapplePoint.Position, so I did)

Makes HumanoidRootPart accelerate towards camera’s look vector
image


Easy to understand, but still cool

You can find the rope-related code under StarterGui.ScriptsAndStuff.GrappleMechanic.Grapple
image

17 Likes