ID = 132286557
function Teleport(hit)
game:GetSevice("TeleportService"):Teleport(ID, hit.Parent)
end
script.Parent.Touched:connect(Teleport)
COMMUNITY QUESTION
Why won't this work?
2 answers
local ID = 132286557
function Teleport(player)
game:service("TeleportService"):Teleport(ID, player)
end
script.Parent.Touched:connect(function(hit)
find = hit.Parent:FindFirstChild("Humanoid")
if find then
plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if plr then
Teleport(plr)
end
end
end)
-- I rushed that code, let me know if it works. (It should work fine though)
1 comment
0
IT worked.
You spelled GetService wrong, you forgot the R.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
I tried it in LocalScript. It didn't work. I tried it in Script, it didn't work.