I’m trying to make a door which moves with a hinge with a tween. The hinge moves perfectly but the door wouldn’t move with the hinge.
This is the model in Explorer:
This is the model in Studio:
The red part is the Hinge and the white part is the door.
Whenever I click the door the Hinge rotates but the door doesn’t move with it.
I have tried using constraints but it still wouldn’t budge.
This is the script I use:
local tweenservice = game:GetService("TweenService")
local part = script.Parent
local tweeninfo = TweenInfo.new(0.5, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out, 0)
local newor = part.Orientation + Vector3.new(0,90,0)
local tween = tweenservice:Create(part,tweeninfo, {Orientation = newor})
local click = part.Parent.Main.ClickDetector
click.MouseClick:Connect(function()
tween:Play()
end)
Tried using it but still wouldn’t work. I dont want the door to just rotate 90 degrees, I want the hinge to move 90 degrees and the door to move with the hinge.
Yes, but I want the door to move into a different position, not just change horizontally. I tried adding a hinge between the door and the hinge. It works, but it teleports when the tween is done, not while the tween is playing.