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

How can I display a GUI if a player is in my game for the first time?

Asked by 3 years ago

I am working on a game, but all of the new players just skip reading the tutorial. It is in a text button. Here’s what I was thinking I could do.

script.Parent.MouseButton1Click:Connect(function(player)
 if player.leaderstats.Wins.Value == 0 then
  game.StarterGui.WelcomeGUI.Frame.HelpFrame.Visible = true
    end
end)

For some reason this isn’t working. What do I do now?

2
You'll need to use data stores and the player joined event icymanred1 6 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago

Yeah. The StarterGui replicates EVERYTHING to the PlayerGui. So you should manipulate the PlayerGui, not the StarterGui. Put the localscript under the ScreenGui.

local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
    if player.leaderstats.Wins.Value >= 1 then --You set the thing to 0. Set to greater than or equal to 1.
        script.Parent.Frame.HelpFrame.Visible = true
    end
end)
Ad

Answer this question