You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
How can I detect if is the first time a Player joins a game?
What is the issue? Include screenshots / videos if possible!
I want to detect if is the first time a Roblox Player joins a game so I can give them a tutorial about the game.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I’ve tried YouTube, Discord, and then Developer Hub but a lot of is not even related to the topic.
I am not sure how other games do it and have seen no one trying to attempt to make a tutorial on it. Note: I am talking about the Ninja Legends type where you will only see it if is your first time joining/ playing the game. I am not talking about the Doomspire Brickbattle type, where you would see it each time you join the game, even if is not your first time.
You can use DataStoreService to store if a player has ever joined your game. If the save is blank, you create a new save to say that they have joined your game previously.
You can use a data store, if there is nothing on the datastore you can create one to say that they joined
Example
local DSS = game:GetService("DataStoreService")
local store = DSS:GetDataStore("Joins")
game.Players.PlayerAdded:Connect(function(plr)
local didjoin = false
local firsttime = false
local success, joined = pcall(function()
return store:GetAsync(plr.UserId)
end)
if success then
if joined = 1 then
didjoin = true
else
store:SetAsync(plr.UserId, 1)
firsttime = true
end
end
if not success then
print("failed")
end
end)
If you don’t understand this you can read more about datastores here: Data Stores or I can recommend this video from @UseCode_Tap whos videos helped me a lot when I was getting started. Data Stores Video
This might not be really efficient due to the player being able to just remove the badge and join and receive the same welcome gui used for only first times joining, Datastores might be more efficient.