mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 03:25:23 +09:00
Added check for nil player for role get_players
This commit is contained in:
@@ -946,7 +946,7 @@ function Roles._prototype:get_players(online)
|
||||
if role_name == self.name then
|
||||
local player = game.players[player_name]
|
||||
-- Filter by online state if required
|
||||
if online == nil or player.connected == online then
|
||||
if player and (online == nil or player.connected == online) then
|
||||
players[#players+1] = player
|
||||
end
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user