Sadly i now have the issue of the GUI being stuck in that players needed to start thing
Make it so that after until the GUI disables
until #game.Players:GetPlayers() >= PlayersToStart
local Children = game.Players:GetChildren()
for i = 1, #Children do
Children[i].PlayerGui.ScreenGui.Enabled = false
end
end
That is my only gui if i disable it nothing is there
So instead of deactivating just set the text to: “” or set the visible to false.
until #game.Players:GetPlayers() >= PlayersToStart
local Children = game.Players:GetChildren()
for i = 1, #Children do
Children[i].PlayerGui.ScreenGui.GameStatus.Text = ""
end
end
But the thing is that the client and the server share the same GUI. When i changed it on the server the client side doesn’t do anything. The server side just overided the client.
If you want to change it from the client you can use remove event.
i am trying to do server to client and it is saying this for this code
error: Argument 1 missing or nil
Blockquote
Status.Changed:Connect(function()
ChangeText:FireClient()
end)
using :FireClient
will require you to define the client : :FireClient(Player)
the Player would be the player instance in the Players Service.
using :FireAllClient
doesn’t require you to define the client.
Yes, you are going to either have to get the player to pass as the first argument
Status.Changed:Connect(function()
local current_player = game:GetService("Players"):GetPlayers()[1]
ChangeText:FireClient(current_player)
end)
Or you can just use FireAllClients() since there’s only one player in the game. Then, in a local script located in StarterPlayerScripts (or possibly a gui element), you are going to want to update the gui, since gui elements should always be (and I think can only be) manipulated on the client side.
Also, I’d look into tying your player count checking code to the Players.PlayerAdded event, as opposed to running a repeat loop.