So I have this game which has a place connected to it for the tutorial. I want a player who has joined for the first time to be sent to the tutorial immediately. I've looked for a forum on this but none have been found by me yet /:.
✓ ANSWER ACCEPTED
How can I cause a player to be teleported to a tutorial?
1 answer
✓ Accepted answer
You can use DataStoreService to check if a player joined before, and then if they didn't, you can use TeleportService to teleport them to another place.
local DataStoreService = game:GetService("DataStoreService")
local TeleportService = game:GetService("TeleportService")
local Players = game:GetService("Players")
local DataStore = DataStoreService:GetDataStore("Players")
local TutorialPlaceId = 0
Players.PlayerAdded:Connect(function(player)
if not DataStore:GetAsync("PlayedBefore") then
TeleportService:Teleport(TutorialPlaceId,player)
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
This may be helpful: https://developer.roblox.com/articles/Teleporting-Between-Places