Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

I don't know why this code to create a rope constraint isn't working. And I don't know why?

I am new to roblox coding and I tried this piece of code and it doesn't appear to be working. I am trying to make a Rope Constraint from 2 bricks called Part1 and Part2 respectively. But when I run it, nothing happens. The script is in ServerScriptService. Thanks for your help.

local c= Instance.new("RopeConstraint",workspace) c.Attachment0=game.Workspace.Part1 c.Attachment1=game.Workspace.Part2

1 answer

✓ Accepted answer

You need to put the attachment object into each brick. The "Attachment1" and "Attachment2" properties require it to be an Attachment class, not a BasePart class. To do this, insert an "Attachment" into each brick. Then, instead of doing "game.Workspace.Part1", do "game.Workspace.Part1.InsertNameOfThatAttachmentHere". Do the same thing with Part2.

2 comments

0

Thank You!

0

@Techley125 make sure to accept answers too1

This discussion is preserved as it was. New answers, comments, and votes are closed.