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

MouseClick not working on text button?

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)

1 comment

0

MouseClick is for ClickDetectors. Use MouseButton1Click

1 answer

✓ Accepted answer

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

1 comment

0

You are super fast, tysm

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