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

how can I make clicking my textbutton take u into a diff game?

I need it so that when some CLICKS my text button, it takes them into a different game. The script I am using takes them into a different game right as they join. what am I doing wrong? please help! Also where do I put the script and what kind of script?

this didn't work when i put this in the text button.

game:GetService("TeleportService"):Teleport(475048432)

what do I do?

1 comment

0

You have to make an event for when the TextButton is clicked.

1 answer

You need something to tell when a player clicks (An Event)

Lets say I have a local script inside the button.

script.Parent.script.Parent.MouseButton1Click:connect(function() -- Check if a person clicks it with a mouse
-- Code goes here 
end)

http://wiki.roblox.com/index.php?title=API:Class/TextButton

If you scroll all the way down, you can see events and explore how they all work.

Hope this helps!

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