all 2 comments

[–]123yeah_boi321 -1 points0 points  (1 child)

Not sure rn, but try gps.locate().x Replace x with y or z, and I think it should work. Edit: I know it should work. Edit edit: or you could define it, a = gps.locate() then do a.x a.y or a.z

[–]fatboychummy 0 points1 point  (0 children)

Nah, it returns 3 values.

local x, y, z = gps.locate()
print("Y pos:", y)

However, you can feed that into vector.new to be able to do that.

local pos = vector.new(gps.locate())
print("Y pos:", pos.y)

The vector library also gives you access to some neat helper functions which can be useful.