Before you call
Citizen.InvokeNative in CitizenFX Lua does not auto-marshal float/Vector3 returns — the result comes back wrong (community reports both a plain boolean and only-the-x-component-as-a-number); for these returns use the named Lua wrapper (e.g. GetEntityVelocity, GetPedBoneCoords, GetOffsetFromEntityInWorldCoords) or append Citizen.ResultAsVector() / Citizen.ResultAsFloat() as the final InvokeNative argument, and in JS/TS (no wrapper exists) Citizen.resultAsVector() / resultAsFloat() is mandatory; plain int/handle and void returns are unaffected.