So I am learning the basics of scripting and I understand almost all the basics so I decided to make it where it says print "I have been Touched" with a script that works that i made along time ago. So I need help printng"I was touched!" Thanks in advance:)
01 | d = script.Parent |
02 |
03 |
04 | function onTouch(part) |
05 | d.Transparency = 1 |
06 | wait( 5 ) |
07 | d.Transparency = 0 |
08 | print "I was Touched!!" |
09 | end |
10 |
11 | d.Touched:connect(onTouch) |
You used the print function incorrectly.
01 | d = script.Parent |
02 |
03 | function onTouch(part) |
04 | d.Transparency = 1 |
05 | wait( 5 ) |
06 | d.Transparency = 0 |
07 | print "I was Touched!!" |
08 | end |
09 |
10 | d.Touched:connect(onTouch) |
Add parentheses and it should work.