Place teleporter problem

Might be a very basic issue but for some reason there’s basically no topics about this.

I want to make a subplace to teleport to but I want to get the id of the subplace.
I’ve tried print(game.GameID) but it says it’s a third party id(even though I own the game)
Even when I disable teleport security it states the place is restricted.
Script:

local teleportservice = game:GetService("TeleportService")
local plr = game.Players.LocalPlayer
script.Parent.MouseButton1Up:Connect(function()
	teleportservice:Teleport(4298961054, plr)
end)
1 Like

Anyone able to help with my issue?

1 Like

I guess I won’t use subplaces then, any solutions for this then please let me know.

1 Like

To get the PlaceId, do

print(game.PlaceId)

This is different to the GameId
The PlaceId is the “subplace” as you mentioned (a place inside the game), whereas the GameId is the main game that people first join to

2 Likes

Thank you so much, I don’t know how I didn’t notice PlaceId exists

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.