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

Constraints not working?

Asked by 8 years ago

I am trying to connect 2 parts with the hingeconstraint. This is my code:

local partA = game.Workspace.Base
local attachmentA = Instance.new("Attachment", partA)
attachmentA.Position = Vector3.new(1, 0, -2)
attachmentA.CFrame = attachmentA.CFrame * CFrame.Angles(0, math.rad(-90), 0)

local partB = game.Workspace.Base2
local attachmentB = Instance.new("Attachment", partB)
attachmentB.Position = Vector3.new(1, 0, 2)
attachmentB.CFrame = attachmentB.CFrame * CFrame.Angles(0, math.rad(90), 0)

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

(Taken from the roblox Joints page)

I enabled show constraints/attachments in the physics settings but the constraints are not there. Only the attachments and the parts are not connected. Am I doing something wrong?

1 answer

Log in to vote
1
Answered by 8 years ago

I believe constraints are currently disabled by Roblox due to the wait on IOS confirming the update to allow constraints.

Ad

Answer this question