Hey there!
I was making a new UI for my game today, and I wanted to make a text button, where I want to when players click there, then they should be teleported to another of my experiences, where the players could start playing the game. Problem is that when I was testing, I’ve clicked the button and wasn’t working. So i’ll let you the code here for if someone could help me out with this, thanks!
local TeleportButton = script.Parent
local UniverseID = "123456789" --This is sample universe ID, do not care about it.
local function onTeleportButtonClick()
game:GetService("TeleportService"):TeleportToPlaceInstance(UniverseID, "")
end
TeleportButton.MouseButton1Click:Connect(onTeleportButtonClick)
Hope to see some answers soon!