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

Help with this script?

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:)

d = script.Parent


function onTouch(part)
   d.Transparency = 1
   wait(5)
   d.Transparency = 0
	print "I was Touched!!"
end

d.Touched:connect(onTouch)

5 comments

0

You forgot something.

0

what is it?

0

The script makes the brick go invisible for 5 seconds btw(that works)

0

Okay iSvenDerp bro. Try it this way. On Line 8, where it says print "I was Touched!!", add parenthesis to both side. So it would be like this: print ("I was Touched!!"). Try that and tell me if it works :D

0

Ok thanks I mean I knew how to do it I jut typoed thanks for helping yall!

1 answer

✓ Accepted answer

You used the print function incorrectly.

d = script.Parent

function onTouch(part)
   d.Transparency = 1
   wait(5)
   d.Transparency = 0
    print "I was Touched!!"
end

d.Touched:connect(onTouch)

Add parentheses and it should work.

3 comments

0

Thanks so much

0

Thanks for the thumbs down random jerk

0

Np man. Thanks for the thumbs down random jerk.

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