Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how to make a teleporter to a game that only works if you teleported to it from another game?

Asked by 4 years ago

I am making a game with chapters

0
make a main game, then make a game that is parented to your main game bountor -5 — 4y
0
after that make like a stat that will save, and then it will save to the other game bountor -5 — 4y

1 answer

Log in to vote
0
Answered by
bountor -5
4 years ago
Edited 4 years ago
game.Players.PlayerAdded:Connect(function(player)
    wait(4)
    local game = instance.new(folder, player)
    game.Name = "Game_Come"
    local game_coming_from = instance.new(IntValue, game)
    game_coming_from.Name = "" -- Place coming from
    game_coming_from.Value = 0 -- *place coming from PLACE id
end)

if game.Players.LocalPlayer.Game_Come.Value == 0  then  -- Place 1 id
     -- code what ever you want it to do
end else
     -- if they did not come from that game
end
0
make sure to make a save script for it bountor -5 — 4y
0
I’m new to lua and I don’t know what is a save script can you help User#31158 0 — 4y
Ad

Answer this question