Hello there!
I am currently making a tutorial for my game and It works and all but it shows up every time you join the game. Is there a way to see if a player is joining for the first time so I can only make the tutorial show to new players?:
basically just make a leaderstats(there are tutorials on that)
make only one leaderstat in your leaderstats and just make it change its value after the tutorial is over
if the value was never changed that means they are new to the game and you can send them the tutorial
I also recommend letting them try the tutorial in game if they want to try it again
Thats a good idea I never thought of that, Thanks!
Use Datastores to save player’s data over multiple play sessions. A common pattern is to split your tutorial into stages, then save the latest completed stage. This allows players to leave in the middle of the tutorial and come back to where they left off.
the split your tutorial into stages is a great idea
I added a page system to mine so that might be a good idea to add
thanks
Yeah thats a great idea thank you!
Hello!
local DataStoreService = game:GetService("DataStoreService")
local DataStore = DataStoreService:GetDataStore("Tutorial")
game.Players.PlayerAdded:Connect(function(Player)
if DataStore:GetAsync(Player.UserId.."-HasSeen") then
wait()
else
Player.PlayerGui:WaitForChild("Tutorial"):WaitForChild("Page1").Visible = true
DataStore:SetAsync(Player.UserId.."-HasSeen", true)
end
end)
You can require your UI named tutorial to use this.
Need more assistance? Just reply. Hope this helps.
EDIT: Goes intro SSS as a server script
you should indent let me help
local DataStoreService = game:GetService(“DataStoreService”)
local DataStore = DataStoreService:GetDataStore(“Tutorial”)
game.Players.PlayerAdded:Connect(function(Player)
if DataStore:GetAsync(Player.UserId…"-HasSeen") then
wait()
else
Player.PlayerGui:WaitForChild(“Tutorial”):WaitForChild(“Page1”).Visible = true
DataStore:SetAsync(Player.UserId…"-HasSeen", true)
end
end)
Hey,
Thank you so much, Ill test it out
Oh just wondering would that be a local or server script?
server script would work much better
Use DataStores. If you already use DataStores in your game, just check to see if the user has any data, and if they don’t have any data show the tutorial.
alright, ill try it thank you so much!
no problem any time, if you got any more problems just ask
It worked great thank you so much!
Hey thanks, I was on mobile so I wasn’t able to do so!
i’ve done it on mobile before
just add 4 spaces for each indent
also yw
Never posted code on mobile using DevForum, thanks again.
@JackFr_ost
One thing I would recommend is saving what part of the tutorial they were on when they left. Whether they finished the tutorial or didn’t start it, it would let you know what you need to change to make the tutorial more enjoyable.
Too long/hard of a tutorial in certain steps, people will leave early where as too easy of a tutorial people might not learn as much as they should and might get bored. The perfect length for a tutorial is around 3 - 5 minutes.
Yeah that’s a great idea, My tutorial is only around 30 seconds it just goes through the basics of the game and how to play it.