Im creating a haunted house game in which you walk through a door, and it teleports you to another game inside the main game. I copied the ID from the "Copy ID" choice in studio under the Games folder. Here's the line of code for the teleporter:
local Part = game.Workspace.TPMePlox
Part.Touched:Connect(function(hit)
local Player = game.Players:GetPlayerFromCharacter(hit.Parent)
if Player ~= nil then
game:GetService("TeleportService"):Teleport(5781381138, Player)
end
end)
HOWEVER, it will rarely teleport me to the game, but mostly it just sends me to a daytime skybox and crashes... I have searched my game for viruses, changed the code 100 times, yet nothing seems to work... HELP ME!

2 comments
Is teleportservice on?? Just a quite simple question which is stupid but wondering
I believe it is