II want to make a tutorial place for the players who joined for the first time, is there any way?
When the player joins, insert their userid into a datastore, and if they join again and their userid is present in said datastore, you dont play the tutorial
Check if player has any data saved. if your game does not save any data, create a DataStore.
local Players = game:GetService("Players")
local DataStoreService = game:GetService("DataStoreService")
local DataStore = DataStoreService:GetStataStore("IsPlayed")
local success, result = pcall(function()
return DataStore:GetAsync(Players.LocalPlayer.UserId) and true or false
end)
if success and result then
DataStore:SetAsync(Players.LocalPlayer.UserId, true)
--Your code for tutorial
end
1 Like
You’ll have to use a datastore. You can keep track of the player’s stats and if they don’t have any or just didn’t complete the tutorial you can show it to them. Data Stores
2 Ways :
1) As others mentioned above , use Data Store
2)Badges. Since you can award a player in a badge only once , you can check if he has badge.
1 Like