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

Teleporting to a different game based on a time sequence?

I'm trying to create a game, and in the game I want to create a script in where after a set amount of time, it teleports you to a different game.

Here's the current code, I don't know how to create an event after a certain amount of time. That's all I need help with.

wait(5)

local TeleportService = game:GetService("TeleportService")
local Place = 4690177594


1 answer

✓ Accepted answer

I'm not sure about how to go about this. I know how to make someone teleport if they're touching something so my suggestion is that you maybe make a part on the ground or something, or somehow make it so players are automatically touching it. Make sure it's transparent and cancollide to checked on, so it would look better of course. That's what I would do, and I'd go about this by putting this script under the part.

wait(5)
local TeleportService = game:GetService("TeleportService") --teleporting system
local gameID = 4690177594  --your game id ofc
 
function onTouched(hit) --if the players touching the brick then
    local player = game.Players:GetPlayerFromCharacter(hit.Parent)
    if player then
        TeleportService:Teleport(gameID, player) --teleporting
    end
end
 
script.Parent.Touched:connect(onTouched)

If this isn't what you wanted (which I know it was not), it's okay. Maybe take this to consideration and tweak it yourself if you want. If it did work, make sure to accept it, if you have any other questions I'll try to stay active enough to answer them!

1 comment

0

Not what I was looking for, but I can work with this, thank you!

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