Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

My teleport on TextButton script is not working. What is wrong with it?

How can I fix this script? Nothing happens when I click on the TextButton.

local id = 218755429 
local button = script.Parent 

button.MouseButton1Click:connect(function() 
    game:GetService("TeleportService"):Teleport(id)
end)

4 comments

0

This is a request, please show a script, and then we'll help improve or fix it

0

I added the script ^

0

thanks, the problem is that it has no clue who the player is. Give me a minute and ill figure it out

0

^ Thank you! Haha, I completely forgot about that.

1 answer

✓ Accepted answer

Make sure this is a LOCAL SCRIPT

id = 218755429 
button = script.Parent 

button.MouseButton1Click:connect(function() 
    game:GetService("TeleportService"):Teleport(id)
end)

If this works please accept my answer.

If not, please, let me know and I'll try and fix it

THANKS!

4 comments

0

The teleport starts, then it claims that there are insufficient priviledges. The game I am teleporting the player to is inactive. Is that the problem?

0

Yes, but you can put the place you want to teleport to inside of the place your at, then it would work.

0

Haha, yeah, I had to add it to the game. Thanks!

0

No problem :D

This discussion is preserved as it was. New answers, comments, and votes are closed.