Help to Player:ScheduleMoveToWorld
#1
Hi,
if i use the follow code i spawn on  Worldspawn or Bed,
but i want to spawn an the coords from vector3d. I called this function with HOOK_PLAYER_SPAWNED


PHP Code:
   local SpawnX 0
    local SpawnY 
64
    local SpawnZ 
0

    local destWorld 
=Player:GetWorld()

 
   local spawnpos3d Vector3d(SpawnXSpawnYSpawnZ)
 
   Player:ScheduleMoveToWorld(destWorld,spawnpos3d,false
Reply
Thanks given by:
#2
You shouldn't use ScheduleMoveToWorld() for same-world teleport, use SetPosition() instead.
Reply
Thanks given by:
#3
(05-17-2017, 07:58 AM)xoft Wrote: You shouldn't use ScheduleMoveToWorld() for same-world teleport, use SetPosition() instead.

It works, thanks!
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)