Teleport to waypoint

I’m trying to make A teleport to waypoint script but it’s broken
Any help?

Could you share the code you have already?

You can use the following code to teleport the player to a waypoint

local waypoint = GetFirstBlipInfoId(8)
if DoesBlipExist(waypoint) then 
    SetEntityCoords(PlayerPedId(), GetBlipInfoIdCoord(waypoint))
else 
    -- waypoint isn't set
end
4 Likes

I have tried this already but it’s teleporting under ground. The z cord is the problem.

Check out GetGroundZFor_3dCoord() Native Reference - Cfx.re Docs

3 Likes

Thank you very much :slight_smile:

Moved, post in the correct category next time :slight_smile:

1 Like

I did post It In the right place. There was a bug i guess…

Where is i put this code?