Void Teleport to spawn
#1
Hi all,
I'm trying to add in Void to spawn teleporting, if someone were to jump off the edge of the lobby world. I took a look at Highjump and the API calls. I got the function listed but its not doing the teleport. Can anyone tell me if I am missing something? Possibly a call to look up default world?

Code:
function OnPlayerMoving(Player)
       local World = Player:GetWorld()
       if(Player:IsOnGround() == false) and (Player:IsGameModeCreative() == false) and (Player:CanFly() == false) and (Player:GetPosY() <= 0) then
               Player:TeleportToCoords(World:GetSpawnX(), World:GetSpawnY(), World:GetSpawnZ())
       end
end

Using this does prevent death but it glitches the client and doesn't teleport.
Thanks in advanced!
Reply
Thanks given by:


Messages In This Thread
Void Teleport to spawn - by feardevilz - 09-12-2016, 03:37 AM
RE: Void Teleport to spawn - by NiLSPACE - 09-12-2016, 03:40 AM
RE: Void Teleport to spawn - by feardevilz - 09-12-2016, 03:50 AM



Users browsing this thread: 1 Guest(s)