So hi!
Is there any possible way of making stage doors open when a button is pressed just like in reality shows.
I tried this script but it is not working.
local rightDoor = game.Workspace.RightScrn
local leftDoor = game.Workspace.LeftScrn
local button = script.Parent -- Replace with the actual name of your button
local doorOpen = false
local doorMoveTime = 1 -- Adjust this time based on your animation speed
local doorStartPosition = Vector3.new(0, 0, 0)
local doorOpenPosition = Vector3.new(3, 0, 0) -- Adjust the X value for a small open
local function toggleDoors()
if doorOpen then
rightDoor.Position = rightDoor.Position - doorOpenPosition
leftDoor.Position = leftDoor.Position + doorOpenPosition
doorOpen = false
else
rightDoor.Position = rightDoor.Position + doorOpenPosition
leftDoor.Position = leftDoor.Position - doorOpenPosition
doorOpen = true
end
end
button.MouseClick:Connect(toggleDoors)