Hello, I’ve been running around through the education site when I found this script shown on there that was made in a tutorial for making a Battle Royale Game. Im not sure where to post this so Im just going to post it here in hoping that a moderator on the forum or someone who has access to the education hub can fix this error.
while true do
until Players.NumPlayers >= gameSettings.minimumPlayers
If you don’t understand the issue here, Roblox are telling players to use a property that has been Deprecated, as stated on the Roblox API.
It even says on the api that NumPlayers and numPlayers is deprecated and will error on use.
You should Instead use game.Players:GetPlayers() to find the integer of players and set a variable value to the value of it, it should return an int value when printed out.
local playerVar = #game.Players:GetPlayers() print(playerVar)
Just something I wanted to share, unless im wrong, please tell me.
Because its no longer efficient to use, like honestly why have a whole property just to check the amount of players that are in the server when you could just use #game.Players:GetPlayers()? Seems dumb to me
You’re misunderstanding what deprecation means. It is basically like saying its no longer supported. This means that were this property to break in the future with an update it won’t be fixed.
The reason they are kept and referenced, and not immediately deleted is because it would break all older scripts and games that utilize it.
Its not a “You can’t and shouldn’t use it” but rather a “Its not recommended to use it”
On that note, you could say every single script that utilizes wait() is a “bad scripting practice” since its been deprecated for task.wait()