RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"Write a script for a realistic door"
-- server script local door = script.Parent local hinge = door.Hinge local open = false local canOpen = true local function toggleDoor() if canOpen then canOpen = false if open then hinge.TargetAngle = 0 open = false else hinge.TargetAngle = 90 open = true end wait(1) canOpen = true end end door.ClickDetector.MouseClick:Connect(toggleDoor)