Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can I script an elevator that teleports you to another game?

I want to create a game but I don't know how can I script an elevator that teleports you to another game when 20 seconds has passed. (And the people can't join to the elevator if it's full) Thank you for helping me.

1 comment

1

This is not a request site.

2 answers

local tp = game:GetService("TeleportService") local gameid = 00000000 -- Put The ID of the other game local time = 20 -- Time until Teleport

script.Parent.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") ~= nil then local chr = hit.Parent else if hit.Parent.Parent:FindFirstChild("Humanoid") ~= nil then local chr = hit.Parent.Parent end end local plr = game.Players:GetPlayerFromCharacter(chr) wait(20) tp:Teleport(gameid,plr) end)

This discussion is preserved as it was. New answers, comments, and votes are closed.