I am currently trying to teleport my avatar into another place attached to my game. Here is the code I used for my Teleportation pad.
local TpService = game:GetService("TeleportService") script.Parent.Touched:Connect(function(hit) local human = hit.Parent:FindFirstChild("Humanoid") if human ~= nil then local GuyWhoTouched = game.Players:GetPlayerFromCharacter(hit.Parent) TpService:Teleport(5616919371,GuyWhoTouched) end end)
However, when I play the game and touch the part, the screen simply freezes, and the program stops responding. The code is in a server script, and the script's parent is the teleporter. I tested this on a live server instead of Studio, and both places are set to private. Is there something wrong with the script?