[HELP] GetSafeCoordForPed() always returning false and Vector3.Zero

I have an annoying problem using GetSafeCoordForPed so that I can create a PED in a random position based on my current position at a distance between -50 and 100 from where I am.
It was working fine, until suddenly I started having problems and I noticed that GetSafeCoordForPed is always returning false and Vector3.Zero even if I pass my current position x, y, z without any change. would anyone have any ideas?

For example I tried something simple to see what was going on and always false feedback

local x,y,z = table.unpack(GetEntityCoords(PlayerPedId(-1)))
local retval, outPosition  = GetSafeCoordForPed(x,y,z,true,16)

But if I have a PED created in my current position, it creates normally, that is, it should return true as a safe location.