Touch brick that creates an apartment and then TPs you. This works.
game:GetService('TeleportService').CustomizedTeleportUI = true
ds = game:GetService("DataStoreService"):GetGlobalDataStore()
local handler = game:GetService("AssetService")
local db = false
script.Parent.Touched:connect(function(hit)
local h = hit.Parent:FindFirstChild("Humanoid")
if h and db == false then db = true
local p = game.Players:FindFirstChild(h.Parent.Name)
local createPlace = handler:CreatePlaceAsync(game.Players:FindFirstChild(p.Name).Name.."'s Apartment",445919249)
wait(1)
game:GetService('TeleportService'):Teleport(createPlace,p)
db = false
end
end)
Clickable button in the Apartment place thats supposed to take you back to the main game.This doesnt work and gives a local error.
game:GetService('TeleportService').CustomizedTeleportUI = true
script.Parent.MouseClick:connect(function(p)
wait(2)
game:GetService('TeleportService'):TeleportToPlaceInstance(372961598,1,p)
wait(2)
end)
Error I get from Local Output : Teleport exception : HTTP 400 (HTTP/1.1 Bad Request)

2 comments
What line is it on?
None, the script is a server script, I get an error in my LOCAL output that says Bad Request. And using just :Teleport() makes the game freeze