mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-30 12:31:41 +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
|
if role_name == self.name then
|
||||||
local player = game.players[player_name]
|
local player = game.players[player_name]
|
||||||
-- Filter by online state if required
|
-- 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
|
players[#players+1] = player
|
||||||
end
|
end
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user