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

Why is brick not being removed?

Asked by 10 years ago

I'm learning to script through a tutorial but this simple script will not work in solo mode.

function touch()
    scripts.Parent:remove()
end

script.Parent.Touched:connect(touch)

Output: Disconnected event because of exception

1 answer

Log in to vote
1
Answered by
hudzell 238 Moderation Voter
10 years ago
function touch()
    script.Parent:remove() --there was an s in the word "script" (scriptS)
end

script.Parent.Touched:connect(touch)

Also I don't think you should be learning scripting through a tutorial. Tutorials make you memorize functions and stuff, making it hard. But if you learn by looking at scripts in free models and changing them to fit your need, you'll learn scripting actually probably in the same time if you did a tutorial, because like I said, a tutorial is hard to follow and memorize, but what I did (learning by looking at scripts in free models and changing them to fit your need), it's the same amount of time, and it's easy!

Ad

Answer this question