Objects not rotating properly

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    A gate that opens two sides to let the player through the middle
  2. What is the issue? Include screenshots / videos if possible!
    The objects are not rotating around the set pivot points.
media

demo of it not working:

pivot points:
image
image

Explorer:
image

Script:

de = false

script.Parent.Touched:Connect(function()
	if de == false then
		de = true
		game:GetService('TweenService'):Create(
			script.Parent.Parent.R,TweenInfo.new(0.5,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut),
		{Orientation = Vector3.new(0,-90,0)}):Play()
		game:GetService('TweenService'):Create(
			script.Parent.Parent.L,TweenInfo.new(0.5,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut),
		{Orientation = Vector3.new(0,90,0)}):Play()
		wait(5)
		game:GetService('TweenService'):Create(
			script.Parent.Parent.R,TweenInfo.new(0.5,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut),
		{Orientation = Vector3.new(0,0,0)}):Play()
		game:GetService('TweenService'):Create(
			script.Parent.Parent.L,TweenInfo.new(0.5,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut),
		{Orientation = Vector3.new(0,0,0)}):Play()
		de = false
	end
end)

I don’t think that the script is the problem, i think that you should create a part at the edge of the doors

like this:

image

Then, u weld the door to that part, and Tween that part

1 Like

I have not really used welds :sweat_smile:, how would I do that?

Oh, you add a WeldConstraint in the explorer to the door’s model, and in part 0 you put the parent of the weld, and then the part 1 to the part that u created like in the photo

if the door’s model have more than one part, you will need to Weld it to the other part too

Should look like this:
image

1 Like

The smaller parts are rotating, but the door itself is not.

1 Like

Use a HingeConstraint, created to make that type of doors. Put an attachment inside the frame of the door, and another one in the door. Then use the hinge to joint them.