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

lua click detector? please help

Asked by 10 years ago

ok I put a regular block down & gave it click detector and under click detector I added a script with if true print 'test' end

It didnt work & I want to know how to auctually make it work and what I did wrong. I am a noob at scripting & I dont know too much

1 answer

Log in to vote
0
Answered by
Azarth 3141 Moderation Voter Community Moderator
10 years ago
script.Parent.MouseClick:connect(function(plr_who_clicked) 
    -- Returns the player who clicked it.
    print(plr_who_clicked.Name.. " clicked me.")
end)

MouseClick event

Concatenation

Ad

Answer this question