Ok, so I am not a good scripter, am a terrible one who guesses infact..
here is the script:
local TeleportService = game:GetService("TeleportService") local gameID = 3869185466 -- put game id here
local function teleport()
wait(0.01) script.Parent.Value = 10 wait(1) script.Parent.Value = 9 wait(1) script.Parent.Value = 8 wait(1) script.Parent.Value = 7 wait(1) script.Parent.Value = 6 wait(1) script.Parent.Value = 5 wait(1) script.Parent.Value = 4 wait(1) script.Parent.Value = 3 wait(1) script.Parent.Value = 2 wait(1) script.Parent.Value = 1 wait(1) script.Parent.Value = 0 end teleport()
That is obviously not how you do it... can someone help me with this? After a certain amount of time for instance, 10 seconds they teleport to another game that you want, and the textlabel for that variable changes aswell like 10, 9, 8, ect.
Hi there! The ROBLOX Wiki is an extremely helpful tool in some cases, especially if you're unsure of what function to use, or what parameters are required for a specific function. In your case, you'd want to use TeleportService:Teleport(). This will allow you to teleport an individual player to a specified game.
Example:
game:GetService("TeleportService"):Teleport(920587237, game:GetService("Players")["TrueFalses"]) -- Teleports TrueFalses to game associated with the ID of 920587237.
Additionally, an easier way to do a countdown would be with a loop. Specifically, a for i
loop. The script below will repeat 10 times, waiting 1 second after each time.
Example:
for i = 1,10 do -- For i loop. Repeats this 10 times. print(10 - i) -- Without this, it would count up instead of down. wait(1) -- Wait 1 second before going again. end -- End the for i loop
Both of these put into your script would look something like this.
local gameID = 3869185466 -- put game id here function Teleport() for i = 1,10 do -- For i loop. Repeats this 10 times. script.Parent.Value = 10 - i -- Without this, it would count up instead of down. wait(1) -- Wait 1 second before going again. end -- End the for i loop game:GetService("TeleportService"):Teleport(gameID, game:GetService("Players")["TrueFalses"]) -- Teleports TrueFalses to game associated with the ID specified in 'gameID'. end Teleport()