I made a GUI that opens when you start the game and it works fine in studio but not in a server?
I am working on a game that has a gui to select a team at the start of a game as well as a frame under the same parent in that gui. The team change buttons trigger the player to switch teams as well as make the teamchange frame not visible and classSelect frame visible. I also have a text box in my teamchange frame that displays how many players are on a team, but this shows up as the text that I have that isn't affected by code (so just "…"). All of the scripts are inside all the buttons and labels and the frames are inside a gui inside of startergui.
If it helps, here is the code inside of the teamchange button
1 | local plr = script.Parent.Parent.Parent.Parent.Parent.Name |
2 | script.Parent.MouseButton 1 Click:connect( function () |
3 | game.Players [ plr ] .TeamColor = BrickColor.new( "Really red" ) |
4 | game.Workspace [ plr ] .Humanoid.Health = "0" |
6 | script.Parent.Parent.Visible = false |
7 | script.Parent.Parent.Parent.ClassFrame.Visible = true |
8 | script.Parent.Parent.Parent.ZoneWarning.Visible = true |