Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to fix this teleportservice script?

Asked by 8 years ago

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

Log in to vote
0
Answered by 8 years ago

I found the answer! I had to use a normal script.

Ad

Answer this question