WeldConstrant not rotating the same as the hinge is rotating

So I was making a gate system and when the when I rotate the Hinge, the welded part doesn’t rotate with the hinge. Anyone can help me?

Is the WeldConstraint enabled?

Also, #help-and-feedback:building-support

Yes, it is enabled.

character lmit

Could you send a file of the spinning object (I assume a door)

Are both objects un-anchored?

Only 1 part is anchored, which is the hinge.

The main part needs to be un-anchored for it to spin

If the way you rotate the hinge is using CFrame or Orientation via script then weldConstrant won’t work. You have to use physical means to rotate the hinge.

I assume you want to make the door swing open yes?
why not just use the tweenservice

here is an example from my other project

local Tween = game:GetService("TweenService")

local Info = TweenInfo.new(1, Enum.EasingStyle.Sine)

local ProximityPrompt = script.Parent
local RotationPart = ProximityPrompt.Parent.Parent.Parent.rotation

local IsOpen = false

ProximityPrompt.Triggered:Connect(function(plr)
	if IsOpen then
		Tween:Create(RotationPart, Info, {CFrame = RotationPart.CFrame * CFrame.Angles(0, math.rad(-90), 0)}):Play()
		IsOpen = false
	else 
		Tween:Create(RotationPart, Info, {CFrame = RotationPart.CFrame * CFrame.Angles(0, math.rad(90), 0)}):Play()
		IsOpen = true
	end
end)

Set up:
image

Result:

I got an error in my script

 22:33:56.161  Workspace.Gate.Lever.Script:17: attempt to call a TweenInfo value  -  Server - Script:17
  22:33:56.161  Stack Begin  -  Studio
  22:33:56.161  Script 'Workspace.Gate.Lever.Script', Line 17  -  Studio - Script:17
  22:33:56.161  Stack End  -  Studio

here’s the code incase if you need it

local model = script.Parent
local pullsound = model.Pull
local tweentarget = model.mover
local goal = model.goal
local tweenservice = game:GetService("TweenService")
local gatemodel = script.Parent.Parent.Gate

script.Parent:MoveTo(script.Parent.Parent.leverplace.Position)

model.base.Attachment.ProximityPrompt.Triggered:Connect(function()
	local tween = tweenservice:Create(tweentarget, TweenInfo.new(0.5, Enum.EasingStyle.Elastic, Enum.EasingDirection.InOut), {CFrame = goal.CFrame})
	pullsound:Play()
	gatemodel.Open:Play()
	tween:Play()
	model.base.Attachment.ProximityPrompt.Enabled = false
	task.wait(1.7)
	local opentween = tweenservice:Create(gatemodel.Gate, TweenInfo.new(0.5, Enum.EasingStyle.Elastic, Enum.EasingDirection.InOut) {CFrame = gatemodel.Gate.CFrame * CFrame.Angles(0, math.rad(90), 0)})
	opentween:Play()
end)

uh oh someone forgot to put " , " between property table and tweeninfo

image

Dang it. I guess I wasn’t looking. Well I’ll try this thing out.

Well, no errors but it didn’t rotate.


bro why can’t my video load
Another edit: nevermind it worked, just wrong instance