I made very cool epic script that teleports players to a second place, for my cool gun game, but instead of teleporting it crashes the game?
local TeleportService = game:GetService("TeleportService")
local Place = (6018067182)
script.Parent.Touched:connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
TeleportService:Teleport(Place, player)
end
end)
does anybody know why this happens?
