How do I make it when you click a brick it teleports you to a universe?
Thanks,
- Vendaz
How do I make it when you click a brick it teleports you to a universe?
Thanks,
local teleportToID = 12345 --ID of the place
local brickToClick = script.Parent --Put this in the brick to click.
local ClickDetector = brickToClick:FindFirstChild("ClickDetector") or Instance.new("ClickDetector", brickToClick) --Make sure that we have something to detect the clicks.
ClickDetector.MouseClick:connect(function(player)
repeat wait(1) until pcall(function() Game:GetService("TeleportService"):Teleport(teleportToID, player.Character) end) --Teleport the player.
end)
I believe the script should be like this: game.workspace.brick if true do () brick.teleport.ID=(insert-game ID here)
Here, go to this link and ignore the first line. http://pastebin.com/kL6diFV0
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
Thanks.