Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 7 years ago

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?

0
You have to make an event for when the TextButton is clicked. M39a9am3R 3210 — 7y

1 answer

Log in to vote
1
Answered by 7 years ago
Edited 7 years ago

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!

Ad

Answer this question