Meow,
I am trying to created loop to another game then going back the previous game then going to the other game again. I want this to go over and over until the player leaves the game.
Any help is welcome.
Meow,
I am trying to created loop to another game then going back the previous game then going to the other game again. I want this to go over and over until the player leaves the game.
Any help is welcome.
place this script in both games and replace the id variable to the other games placeid
local tp = game:GetService("TeleportService")
local id = [OTHER GAMES PLACEID HERE]
while wait() do
for i, v in ipairs(game.Players:GetChildren()) do
tp:Teleport(id, v)
end
end
(note: untested)
Put this in both games in ServerScriptService, fill in the Other Place Id variable in each game
local Place = -- Other place ID
game.Players.PlayerAdded:Connect(function(p)
game:GetService('TeleportService'):Teleport(Place, p)
end)
That did not do it…
I still appreciate you trying to help so thank you.
on the off chance you are doing this, testing this script in studio will not work as you cannot teleport between places in studio
Edit: I tested my script and it works fine on my end.
I am using a place added to the game through asset manager:
I know what you mean now, I was seeing if you could do it a different way but apparently not.
Thank you for helping.
You can teleport between separate games, just not inside studio. If you create two games, publish both, enable teleports in the game settings of both, and add the script to Workspace or ServerScriptService+set the id, everything should work.