Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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?

1 comment

2

You'll need to use data stores and the player joined event

1 answer

✓ Accepted answer

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)

This discussion is preserved as it was. New answers, comments, and votes are closed.