Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to Use New Joint System Through Code?

Asked by 8 years ago

I wanted to test out the new joint system, but it's not working out so well. I tried pasting the some of the code om the joint Roblox wiki page into ServerScriptService, but it only seems like the attachments are being created. The code is such;

local partA = game.Workspace.PartA
local attachmentA = Instance.new("Attachment", partA)
attachmentA.Position = Vector3.new(0, 0, -1)

local partB = game.Workspace.PartB
local attachmentB = Instance.new("Attachment", partB)
attachmentB.Position = Vector3.new(0, .5, 0)

local rodConstraint = Instance.new("RodConstraint", partA)
rodConstraint.Attachment0 = attachmentA
rodConstraint.Attachment1 = attachmentB
rodConstraint.Length = 5
rodConstraint.Enabled = true

As for what happens in the workspace, it looks something like this.

1 answer

Log in to vote
1
Answered by 8 years ago

These features have not been enabled yet, it is at the top of the API.

RodConstraint

Ad

Answer this question