I’m making a 2 players needed to start script and I tested it out and the gui text stayed the same for the client but when I switched to the server it changed to what I wanted it to. I’m not sure why it didn’t change for me, here’s the code
local Plrcount = game.Players:GetChildren()
if #Plrcount >= 2 then
--Not done yet
else
TimerDisplay.Text = "2 players needed to start"
end
local Players = game:GetService("Players")
while true do
local plrCount = Players:GetPlayers
if #plrCount > 1 then
-- add your code here
else
TimerDisplay.Text = "2 players needed to start"
end
end
local Players = game:GetService("Players")
function update()
local plrCount = Players:GetPlayers()
if #plrCount > 1 then
-- add your code here
else
TimerDisplay.Text = "2 players needed to start"
end
end
Players.PlayedAdded:Connect(update)
Players.PlayedRemoving:Connect(update)
also, your script is very dangerous since it has no wait()