Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to fix this teleportservice script?

For some reason my TeleportService Script won't work. I kept on reading the wiki and had no mistakes. Here is my script.

local TeleportService = game:GetService("TeleportService")
local BNZId = 406186071

function onTouched(hit)
   local player = game.Players:GetPlayerFromCharacter(hit.Parent)
   if player then
      TeleportService:Teleport(BNZId, player)
   end
end

script.Parent:connect(onTouched)

(BNZId is the place) Compare this to this link:http://wiki.roblox.com/index.php?title=TeleportService_guide If you find any mistakes or could fix this, please answer. (Used LocalScript)

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.