Door (Orientation? Position?) Issue

Hi.

I don’t get what’s wrong.


image

local ts = game:GetService("TweenService")
local d = false
local sound = script.Parent.Sound
script.Parent.ProximityPrompt.Triggered:Connect(function(Player)
	if d == false then
		script.Parent.ProximityPrompt.Enabled = false
		d = true
		sound:Play()
		ts:Create(script.Parent.Parent.Door1,TweenInfo.new(sound.TimeLength,Enum.EasingStyle.Quint,Enum.EasingDirection.Out),{Orientation = script.Parent.Parent.EndDoor.Orientation, Position = script.Parent.Parent.EndDoor.Position}):Play()
		wait(3)
		sound:Play()
		ts:Create(script.Parent.Parent.Door1,TweenInfo.new(sound.TimeLength,Enum.EasingStyle.Quint,Enum.EasingDirection.Out),{Orientation = script.Parent.Parent.ReferDoor.Orientation, Position = script.Parent.Parent.ReferDoor.Position}):Play()
		d = false
		wait(sound.TimeLength)
		script.Parent.ProximityPrompt.Enabled = true
	end
end)

Thanks

1 Like

It’s both. Put the doors on the other side. instead of on the right side. Move it to the left. Aka the edge of the door. It should work then.

1 Like

It’s ‘pivoting’ between the Start and End positions, but if you look you’re got the End Orientation rotated 180 degrees to where it should appear.

1 Like

Door1 Orientation: 0, -180, 0
EndDoor Orientation: 0, 90, 0
ReferDoor Orientation: 0, -180, 0

All pivots are at 0,0,0

Did you change the EndDoor Orientation like I said?

If you started with 180 (same as -180) then the end should be 90 degrees clockwise from the start which is 270 (-90 degrees) and you have it at 90 degrees.

Also don’t you have a debounce built in when you set the ProximityPrompt set to Enabled = false, so why use ‘d’ as a debounce?

Will try this tomorrow.

I always add debounce but I see what you mean.

Try making EndDoor Orientation to 0, -90, 0. It will do turn 180* so that means it will be located in the back.