Hello! I've inserted the following script in a part. It is a local script.
local TeleportService = game:GetService("TeleportService") local Place = 4536115280 script.Parent.Touched:connect(function(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player then TeleportService:Teleport(Place, player) end end
When colliding with the part, you aren't moved to the game you should to. Any help?
You can't use Localscript with touched. Instead put it in a ServerScript Your using GetPlayerFromCharacter() anyway instead of game.Players.LocalPlayer.Character. So that means this goes in a ServerScript. As well when you put it in a ServerScript you cannot teleport in studio!