0 views0 copies0 likes
Proximity Sliding Door for a Lobby
Universal script
Copy it, then test it in your own Studio place.
Script code
21 lines · 0.6 KBlocal TweenService = game:GetService("TweenService")local door = workspace:WaitForChild("LobbyDoor")local panel = workspace:WaitForChild("DoorPanel")local closed = door.CFramelocal open = closed * CFrame.new(6, 0, 0)local prompt = Instance.new("ProximityPrompt", panel)prompt.ActionText = "Open door"local busy = falselocal function move(goal) local tween = TweenService:Create(door, TweenInfo.new(0.55), {CFrame = goal}) tween:Play() tween.Completed:Wait()endprompt.Triggered:Connect(function()-- …open Get script for the full sourceAbout this script
Add two anchored parts to Workspace called LobbyDoor and DoorPanel. The prompt on the panel slides the door six studs along its local X axis, holds it for two seconds and returns it gently. The busy lock keeps multiple visitors from interrupting the movement. Leave enough clearance for the opened door, and tune the direction or travel distance to match the doorway.
Log in to leave a comment.
No comments yet
Be the first to share your thoughts!
Comments
Share what works, ask questions, or report an issue.