Double Door opening weirdly

Can you show me the code that you are using currently. I made three different kinds of versions so that’s why I’m asking.

actually just save the model as a file and send it to me

Double Door.rbxm (37.7 KB) You might need to change the 93.865 number to make it better

1 Like

odd, it’s just frozen for me. Could you send me a clip of it working for you?

I FOUND A FIX! I did some searches and I managed to find a different way to tween the orientation.

local TweenService = game:GetService("TweenService")
local door = script.Parent
local doorRoot = door.LDoor.PrimaryPart
local doorRoot2 = door.RDoor.PrimaryPart

local PromptFromIn = script.Parent.Part.InnerPrompt.ProximityPrompt
local PromptFromOut = script.Parent.Part.OuterPrompt.ProximityPrompt

local IsDoorOpen = false

local DoorSwingOpen = TweenService:Create(doorRoot, TweenInfo.new(1,Enum.EasingStyle.Quart,Enum.EasingDirection.Out),{
	CFrame = doorRoot.CFrame * CFrame.Angles(0,math.rad(-99.59), 0)
})
local DoorSwingOpen2 = TweenService:Create(doorRoot2, TweenInfo.new(1,Enum.EasingStyle.Quart,Enum.EasingDirection.Out),{
	CFrame = doorRoot2.CFrame * CFrame.Angles(0, math.rad(99.59), 0)
})

local DoorSwingClose = TweenService:Create(doorRoot, TweenInfo.new(1,Enum.EasingStyle.Quart,Enum.EasingDirection.Out),{
	CFrame = doorRoot.CFrame * CFrame.Angles(0, math.rad(0), 0)
})
local DoorSwingClose2 = TweenService:Create(doorRoot2, TweenInfo.new(1,Enum.EasingStyle.Quart,Enum.EasingDirection.Out),{
	CFrame = doorRoot2.CFrame * CFrame.Angles(0, math.rad(0), 0)
})

PromptFromIn.Triggered:Connect(function()
	if not IsDoorOpen then
		DoorSwingOpen:Play()
		DoorSwingOpen2:Play()
		IsDoorOpen = true
		PromptFromIn.Enabled = false
		PromptFromOut.Enabled = false
		wait(2)
		PromptFromIn.Enabled = true
		PromptFromOut.Enabled = true
	else
		DoorSwingClose:Play()
		DoorSwingClose2:Play()
		IsDoorOpen = false
		PromptFromIn.Enabled = false
		PromptFromOut.Enabled = false
		wait(2)
		PromptFromIn.Enabled = true
		PromptFromOut.Enabled = true
	end
end)

PromptFromOut.Triggered:Connect(function()
	if not IsDoorOpen then
		DoorSwingOpen:Play()
		DoorSwingOpen2:Play()
		IsDoorOpen = true
		PromptFromIn.Enabled = false
		PromptFromOut.Enabled = false
		wait(2)
		PromptFromIn.Enabled = true
		PromptFromOut.Enabled = true
	else
		DoorSwingClose:Play()
		DoorSwingClose2:Play()
		IsDoorOpen = false
		PromptFromIn.Enabled = false
		PromptFromOut.Enabled = false
		wait(2)
		PromptFromIn.Enabled = true
		PromptFromOut.Enabled = true
	end
end)

thank you @Pro3taco and @sozzly for helping me find a possible fix!

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.