Hello, I'm new to scripting, could anyone help me with a touched function?
1 | function touchies() |
2 | --bunch of stuff you don't need to know about |
3 | end |
4 | script.Parent:Touch(touchies) |
Line 4 is the problem, you put :Touch
You need to put, .Touched:connect
So here is the fixed script:
1 | function touchies() |
2 | --stuff |
3 | end |
4 | script.Parent.Touched:connect(touchies) |
And if you didn't know, there is an alternative way.
Put line 4 into line 1 and change end
to end)
Like this:
1 | script.Parent.Touched:connect( function () |
2 | --stuff |
3 | end ) |