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)
I use this code for my main games children, it should work. Simple and efficient! xd
port = game:service("TeleportService") ID = -- Put the ID of the main place in here function onClicked() port:Teleport(ID) end script.Parent.MouseButton1Click:connect(onClicked)