menu
Roblox Forum Archive
Home
User Search
Forums
Donate
search
settings
Home
User Search
Forums
Donate
launch
Go to User Dashboard
Forums
Scripting Helpers
Help with function?
chevron_left
chevron_left
chevron_left
of
1
chevron_right
chevron_right
chevron_right
Help with function?
Rojadi
Join Date: 2014-07-08
Post Count: 4
#139932293
Friday, July 11, 2014 12:44 AM GMT
I am noob at this thing of scripting and i want to make a brick print the word ''hi'' when you click it. What would the code look like? :/
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
rockshe1000
Join Date: 2011-05-26
Post Count: 547
#139933313
Friday, July 11, 2014 12:54 AM GMT
function onClicked(playerWhoClicked) print("Hi!") end script.Parent.ClickDetector.MouseClick:connect(onClicked) this should work?
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
luigi01302
Join Date: 2009-07-12
Post Count: 511
#139933571
Friday, July 11, 2014 12:56 AM GMT
First insert a ClickDetector into the brick and then a script. function onClicked() print "HAI" -- Change this to whatever you want. end script.Parent.ClickDetector.MouseClick:connect(onClicked)
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
Rojadi
Join Date: 2014-07-08
Post Count: 4
#140001862
Friday, July 11, 2014 5:53 PM GMT
Thanks, it works.
Go to point in time
arrow_right
10 minutes before
5 minutes before
At time of posting
5 minutes after
10 minutes after
more_horiz
chevron_left
chevron_left
chevron_left
of
1
chevron_right
chevron_right
chevron_right