Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do we check if there is more then one player in the game?

Asked by 4 years ago
Edited 4 years ago

local playersin = game.Players:GetChildren()

if playersin < 2 then script.Parent.Parent.TimerTittle.Text = "Waiting For Players" end

but I don't understand whats wrong with this code

1 answer

Log in to vote
0
Answered by
Aztralzz 169
4 years ago

You need to put the code into a codeblock for one, but I'm trying to grind, so here you go.

local playersin = game.Players:GetPlayers()
if #playersin < 2 then script.Parent.Parent.TimerTittle.Text = "Waiting For Players" 
end

You needed a # before playersin to get the number. You were almost right, good job! Good luck on your game!

0
Omg am so stupid how can I forget something that simple Thank you lol Xx0966xX 41 — 4y
Ad

Answer this question