Teleporting to a(n) asset place

I need help, I have recently been working hard on a(n) angel game and to make the teleport thing, I went to asset manager and added a place to the game, But how do I tp to it…? I tried my own ideas but it did not work ;c, what script can I add to my gui button to make it work…?

Solution found

@orange4477dev helped a bit too!

2 Likes

Belongs in #help-and-feedback:scripting-support I think.

Right click on the place and click copy id and paste it into a script like this.

script.Parent.MouseButton1Click:Connect(function()
 game:GetService("TeleportService"):Teleport(00000000, game.Players.LocalPlayer) --replace 00000000 with the id
end)

I’ll try it, thanks so much!

If it doesn’t work I’ll post another post on that channel

1 Like

Does it go in a localscript? Or a normal script

this script does not require end?

It needs a end) to workkkkkkkkkk

1 Like

From my beliefs, you want the client to be teleported to another game within the main place. Try this script:

--/ Services \--
local TS = game:GetService("TeleportService")

--/ Variables \--
local GameID = 000000 -- Change "000000" To The Game ID You Want The Player To Be Teleported To!
local User = game:GetService("Players").LocalPlayer

--/ Main Script \--
script.Parent.MouseButton1Click:Connect(function()
    TS:TeleportAsync(User, GameID)
end)

This will be a LocalScript, under the Gui object that players click to get teleported! Let me know about any issues you run into! (:

1 Like