Server Teleporter Help

How could this be rewritten to be more smooth and consistent during a game? Sometimes it works and other times it is really delayed (5-10 seconds)

-- function onTouched(hit)
    local player = game.Players:GetPlayerFromCharacter(hit.Parent)
    wait(.01) if player then

Whenever I’ve used teleport service to TP between places, its always been inconsistent. I don’t think you can do anything to fix it.

1 Like

There isn’t much you can do to fix this unfortunately. Maybe try to create a less awkward wait, perhaps make a frame appear on screen saying “TELEPORTING - PLEASE WAIT”.

A major glaring issue I see here is that your script is teleporting a user every time they register .Touched, which could be like 10 times in less than a second, I’m sure TeleportService has something to combat this, but it just doesn’t seem right to me.

As others have mentioned, TeleportService is inconsistent, breaks a lot, and should overall be avoided whenever possible.