I have a tool.
In this tool there is a handle
In this handle there is a localscript
And finally, in this localscript there is an intValue.
The name of the intValue is called "Flag"
And so before even doing anything else, an error is thrown when I attempt:
v = script.Flag
And an error is thrown: "Flag is not a valid member of localscript"
I have then tried v = script:findFirstChild("Flag")
Then when I do a conditional if v.Value == 5 then
Another error is thrown "attempt to index global 'Flag' (a nil value)"
Thus I have no idea whats going on.
For bugfixing, try putting that code in an if
loop that reads:
if script:FindFirstChild("Flag") end
And if that doesnt work, it's a possibility the error is something as small as the object's name being "flag" instead of "Flag"