Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

A Gui that shows the first time the player plays?

Asked by
lucas4114 607 Moderation Voter
9 years ago

I tryed making a script to save a value to show a gui only the first time a player plays but it doesn't work..... This is Workspace:


function CreateSave(plr) if plr:WaitForDataReady() then wait(0.03) plr:SaveBoolean("PlayerPlayed_test", false) local PlayerPlayedData = plr:LoadBoolean("PlayerPlayed_test") local PlayerPlayed = Instance.new("BoolValue") PlayerPlayed.Name = "PlayerPlayed" PlayerPlayed.Parent = plr PlayerPlayed.Value = PlayerPlayedData end end game.Players.PlayerAdded:connect(CreateSave)

This is in the Gui, in StarterGui:


function ShowGui(plr) if plr.PlayerPlayed == false then script.Parent.Visible = true script.Parent.MouseButton1Click:connect(function() script.Parent.Visible = false end) end end game.Players.PlayerAdded:connect(ShowGui)
0
Why not just clone the GUI to the PlayerGui on PlayerAdded, waiting for the PlayerGui to exist before setting the GUI's parent? It's much faster and easier. Spongocardo 1991 — 9y
0
Ok, I'll try that... lucas4114 607 — 9y

Answer this question