I don't know why my action works only when him want.
I want to get name of the player in certain location, for test i make my character say the name.
local player = getcreatures('ps')
local playercount = player.count-1
for i=0, playercount do
local name = player[i].name
local playerx = player[i].x
local playery = player[i].y
local playerz = player[i].z
if (playerx == posx+2 and playery == posy and playerz == posz) then