I am trying to make a game that automatically chooses maps (which I do not need help with) but there is a problem; when I try to change a textlabel in a ScreenGui with a script located anywhere (even if I make it a child of the textlabel) the script won't make it change. I put it in the script that chooses the maps, and the actual map choosing part works, but is there anything wrong with this line? It even prints but it doesn't change the label
print("castle was selected") game.StarterGui.Status.e.Text = "The 'Castle' map has been chosen"
"Status" is the ScreenGui, and "e" is the TextLabel``
You will need to access the player gui for any changes to display because when you change it in the starter gui it won’t be visible try
local Player = game.Players.LocalPlayer local PlrGui = Player:WaitForChild(“PlayerGui”)
local your gui = PlrGu:WaitForChild:(“yourscreengui”).something
I am not a good scripter but I think you need a for
loop, and change "StarterGui" to PlayerGui instead. Here is the script:
local Players = game:GetService("Players") local player = Players:GetChildren() for i,v in pairs(player) do v.PlayerGui.Status.e.Text = "The 'Castle' map has been chosen!" end
I am not pro at scripting. I haven't tested the script above but I think it will work. If it works then let me know, if it doesn't then let me know too in the comments!