player.GetAll is a nil value

player.GetAll is a nil value



[ERROR] gamemodes/darkrp/gamemode/shared/entity.lua:122: attempt to call field 'GetAll' (a nil value)
  1. fn - gamemodes/darkrp/gamemode/shared/entity.lua:122
   2. unknown - addons/ulib/lua/ulib/shared/hook.lua:183


[ERROR] gamemodes/darkrp/gamemode/shared/entity.lua:122: attempt to call field 'GetAll' (a nil value)
  1. fn - gamemodes/darkrp/gamemode/shared/entity.lua:122
   2. unknown - addons/ulib/lua/ulib/shared/hook.lua:183


[ERROR] gamemodes/darkrp/gamemode/shared/entity.lua:122: attempt to call field 'GetAll' (a nil value)
  1. fn - gamemodes/darkrp/gamemode/shared/entity.lua:122
   2. unknown - addons/ulib/lua/ulib/shared/hook.lua:183


[ERROR] gamemodes/darkrp/gamemode/shared/entity.lua:122: attempt to call field 'GetAll' (a nil value)
  1. fn - gamemodes/darkrp/gamemode/shared/entity.lua:122
   2. unknown - addons/ulib/lua/ulib/shared/hook.lua:183


[ERROR] gamemodes/darkrp/gamemode/shared/entity.lua:122: attempt to call field 'GetAll' (a nil value)
  1. fn - gamemodes/darkrp/gamemode/shared/entity.lua:122
   2. unknown - addons/ulib/lua/ulib/shared/hook.lua:183


[ERROR] gamemodes/darkrp/gamemode/shared/entity.lua:122: attempt to call field 'GetAll' (a nil value)
  1. fn - gamemodes/darkrp/gamemode/shared/entity.lua:122
   2. unknown - addons/ulib/lua/ulib/shared/hook.lua:183


[ERROR] gamemodes/darkrp/gamemode/shared/entity.lua:122: attempt to call field 'GetAll' (a nil value)
  1. fn - gamemodes/darkrp/gamemode/shared/entity.lua:122
   2. unknown - addons/ulib/lua/ulib/shared/hook.lua:183


[ERROR] gamemodes/darkrp/gamemode/shared/entity.lua:122: attempt to call field 'GetAll' (a nil value)
  1. fn - gamemodes/darkrp/gamemode/shared/entity.lua:122
   2. unknown - addons/ulib/lua/ulib/shared/hook.lua:183


[ERROR] gamemodes/darkrp/gamemode/shared/entity.lua:122: attempt to call field 'GetAll' (a nil value)
  1. fn - gamemodes/darkrp/gamemode/shared/entity.lua:122
   2. unknown - addons/ulib/lua/ulib/shared/hook.lua:183


[ERROR] gamemodes/darkrp/gamemode/shared/entity.lua:122: attempt to call field 'GetAll' (a nil value)
  1. fn - gamemodes/darkrp/gamemode/shared/entity.lua:122
   2. unknown - addons/ulib/lua/ulib/shared/hook.lua:183


[ERROR] gamemodes/darkrp/gamemode/shared/entity.lua:122: attempt to call field 'GetAll' (a nil value)
  1. fn - gamemodes/darkrp/gamemode/shared/entity.lua:122
   2. unknown - addons/ulib/lua/ulib/shared/hook.lua:183


[ERROR] gamemodes/darkrp/gamemode/shared/entity.lua:122: attempt to call field 'GetAll' (a nil value)
  1. fn - gamemodes/darkrp/gamemode/shared/entity.lua:122
   2. unknown - addons/ulib/lua/ulib/shared/hook.lua:183


[ERROR] gamemodes/darkrp/gamemode/shared/entity.lua:122: attempt to call field 'GetAll' (a nil value)
  1. fn - gamemodes/darkrp/gamemode/shared/entity.lua:122
   2. unknown - addons/ulib/lua/ulib/shared/hook.lua:183


[ERROR] gamemodes/darkrp/gamemode/shared/entity.lua:122: attempt to call field 'GetAll' (a nil value)
  1. fn - gamemodes/darkrp/gamemode/shared/entity.lua:122
   2. unknown - addons/ulib/lua/ulib/shared/hook.lua:183


[ERROR] gamemodes/darkrp/gamemode/shared/entity.lua:122: attempt to call field 'GetAll' (a nil value)
  1. fn - gamemodes/darkrp/gamemode/shared/entity.lua:122
   2. unknown - addons/ulib/lua/ulib/shared/hook.lua:183


[ERROR] gamemodes/darkrp/gamemode/shared/entity.lua:122: attempt to call field 'GetAll' (a nil value)
  1. fn - gamemodes/darkrp/gamemode/shared/entity.lua:122
   2. unknown - addons/ulib/lua/ulib/shared/hook.lua:183




local DoorOwners = {}
			local door1 = v
			
			for k,v in pairs(player.GetAll()) do
				if door1:OwnedBy(v) then
					table.insert(DoorOwners, v)
				end
			end

This kind of issues tends to happen in singleplayer. You should use a dedicated server or at least the listened multiplayer feature.
Something could have overwritten ‘player’, too. Try calling print(player).

It was on my dedicated testing server. I will try to print(player) or move my code to modules.
–EDIT
SURE! I owervrited player(local player = LocalPlayer()). Changed to local ply = LocalPlayer(). It works