I got a problem when i'm trying to make a part that when you touch it, it make you teleport to another place, like the egg hunt (2014).
I'm working on a new game, I try to use no free models, please help me to know about this part of the job, please help me to fix it.
function onTouched(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
game:GetService("TeleportService"):TeleportToSpawnByName(141257134, "SpawnLocation", player)
end
end
Thank you. --TheDarkSpy07--

2 comments
Okay thanks you.
Yep, no problem.