I'm trying to make a simulator but when I try to do my script and I type - it says unexpected symbol near '-'
here's a screen shot
use this link to see it pls help me fix this
I'm trying to make a simulator but when I try to do my script and I type - it says unexpected symbol near '-'
here's a screen shot
use this link to see it pls help me fix this
It mean's pretty much what it states, "unexpected symbol". Try changing the top line to...
local tool = script.Parent
Let me know if that helps, if not leave a comment.
I think I know what you mean.
local tool = tool - script.parent
There. Lua doesn't recognise local tool = tool - script.parent. follow the script above.
and what the hell does subtracting a tool mean? He meant an equal sign not some weird math stuff.
This discussion is preserved as it was. New answers, comments, and votes are closed.
3 comments
replace - with =
only use - if you need to substract
Yep, it's an end-of-function error. It expected you to put an equal sign there, not a hyphen.