09-12-2016, 03:37 AM
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?
Using this does prevent death but it glitches the client and doesn't teleport.
Thanks in advanced!
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!