I am working on an intro script for a friend and I am trying to make it play only the first time you join. I looked up how Data Persistence works and found that you can use some methods to make it easier. I have done this exactly the way the tutorial suggested, and it hasn't worked.
game.Players.PlayerAdded:connect(function(player) player:WaitForDataReady() local joined = player:LoadString("AlreadyCome") if joined == nil then --DoIntroStuff
At the end of the script I have got
player:SaveString("AlreadyCome", "I'veBeenBefore") player.PlayerGui.NewGui.Exit.MouseButton1Down:connect(function(mouse) player.PlayerGui.NewGui:remove()
After looking at it through test mode, I can see that Boolean value 'DataReady' doesn't turn to true. Please help.
Here's another idea how bout you put the intro in the ServerStorage
then do this
game.Players.PlayerAdded:connect(function(p) Intro = game.ServerStorage["Intro Name"]:Clone() Intro.Parent = p.PlayerGui end)
This was done on an IPad sorry if has simple errors
For only one time join do this
game.Players.PlayerAdded:connect(function(p) Local bintro = Instance.new("BoolValue", p) bintro.Name = "Intro" p:WaitForDataReady() p:LoadBool("intro") -- not sure if it is bool or Boolean if p.Intro.Value == false then Intro = game.ServerStorage["Intro Name"]:Clone() Intro.Parent = p.PlayerGui end end)
game.Players.PlayerRemoving:connect(function(p) p:SaveBool("intro", p.Intro.Value) end)