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

Why won't this gui popup whenever a player joins the game?


print("doo")
game.Players.PlayerAdded:Connect(function(player)

	player:WaitForChild("PlayerGui")
	player:WaitForChild("GymRules")
	player.PlayerGui.GymRules.Frame.Visible = true
end)

When I run the game, theres no output to this but the gui doesn't show up. I did run the game and check in my inventory if both PlayerGui and GymRules was in there, and it was. Why won't this gui popup when a player joins the game? This script is in ServerScriptService, and the gui is in StarterGui with the visibility set on 0. I've tried putting it in Workspace, but that didn't work either.

4 comments

0

I tried deleted 4 and 5, and I made sure it was enabled and the visibility was set to false, not the background transparency. The script in ServerScriptService is a script, so that's not the issue either. It's still not working.

0

Would you mind joining the scriptinghelpers discord so i can help there?

0

I don't mind. I just joined.

0

Post a screenshot of your explorer with the gui and things expanded

1 answer

Maybe the GUI is not enabled if so this script should do

print("doo")
local player = game:GetService("Players").LocalPlayer

game.Players.PlayerAdded:Connect(function(player)
    player:WaitForChild("PlayerGui")
    player:WaitForChild("GymRules")
    player:WaitForChild("PlayerGui").GymRules.Frame.Visible = true
    player:WaitForChild("PlayerGui").GymRules.Enabled = true
end)


also make sure its a local script

goodbye!

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