If the two objects are called Part1 and Part2, how do I create a rope constraint between them with a script?
✓ ANSWER ACCEPTED
How to create a rope constraint between two objects with a script?
1 answer
✓ Accepted answer
Instance.new should make two attachments in these parts,Change the references in the script but i think it will work, this script will make two attachments in the parts and set the attachments in the Rope-Constraint, i hope this script helps
-- Creates rope Constraint
local Rope = Instance.new("RopeConstraint", game.Workspace.Part1)
-- Creates Attachments
local Attachment0 = Instance.new("Attachment", game.Workspace.Part1)
local Attachment1 = Instance.new("Attachment", game.Workspace.Part2)
-- Sets the Attachments of Rope Constraint
Rope.Attachment0 = Attachment0
Rope.Attachment1 = Attachment1
-- Makes it visible
Rope.Visible = true
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Thank you, this script works.