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

Constraints not working?

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

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

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