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

How do I print onTouch?

Asked by 8 years ago

I can't figure out how to get this to work. Can someone help?

function onTouch()
wait()
print(hi)
script.Parent.Touched:connect(onTouch)
0
You forgot the end for the function... M39a9am3R 3210 — 8y

1 answer

Log in to vote
1
Answered by
theCJarmy7 1293 Moderation Voter
8 years ago

Well, you're not printing a string!

function onTouch()
    wait()
    print("hi")
end
script.Parent.Touched:connect(onTouch)

And like M39aam3r said, you forgot the end.

Ad

Answer this question