UI BUTTON: wait(1)
local ExitDormButton = script.Parent
local player = game.Players.LocalPlayer
local debounce = false
ExitDormButton.MouseButton1Click:Connect(function()
if workspace.CurrentCamera.CameraType == Enum.CameraType.Scriptable then
workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
end
end)
function teleport()
if not debounce then
debounce = true
LowerTorso = player.Character.LowerTorso
LowerTorso.CFrame = game.Workspace.TPparts.ExitDormTp.CFrame
end
end
ExitDormButton.MouseButton1Click:Connect(teleport)
while true do wait()
debouonce = false
wait(0.5)
end