Hi. I am making a roblox game like Myst 3 Exile. So I am making books which when you click an imagebutton it teleports you to another place. But my scripts for the teleporting arent working at all.
This is my teleporter script.
local TeleportService = game:GetService("TeleportService")
local level1Id = 2573376319
--local level2Id =
game.Players.PlayerAdded:connect(function(player)
TeleportService:Teleport(level1Id, player)
end)
This is the path for the image thing https://imgur.com/a/vNlwir2
So how do I fix it so when you click the image in the surface gui on the block it teleports you to the place. I cant find it anywhere.

5 comments
Do I need a click detector ?
Do you really need Teleport Service? Simply use CFrame.
^ face palm
i dont think you use CFrames to teleport players through places and games
LOL...... Sad invencive.... ^^^.. I am laughing so hard rn... Anyways, back to the question, Change connect to Connect and if you don't have the game connected with level1Id then connect that place to the game