What is the exact error message?
Either your Player object is nil, so you cannot call GetWorld() on it, or the player is not inside a world yet, so GetWorld() returns a nil world, or there's a bug in the generated Lua bindings code.
Either your Player object is nil, so you cannot call GetWorld() on it, or the player is not inside a world yet, so GetWorld() returns a nil world, or there's a bug in the generated Lua bindings code.