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

MouseClick not working on text button?

Asked by 5 years ago

I'm really new so sorry if I'm annoying but, why doesn't this work, I heard that this is how to run code when text buttons get clickedd

function Clicked()
    game.Players.TheHappy4Life:kick("test click")
end
script.Parent.TextButton.MouseClick:connect(Clicked)
0
MouseClick is for ClickDetectors. Use MouseButton1Click Sonnenroboter 336 — 5y

1 answer

Log in to vote
1
Answered by 5 years ago

MouseClick isn't an event of TextButtons, I think you mean .MouseButton1Click and also :connect is deprecated, it's better to use :Connect

0
You are super fast, tysm TheHappy4Life 28 — 5y
Ad

Answer this question