So I got a message from someone that was referred to be from an old friend I used to help out and he has a gear script. It essentialy waits for the Handle to be touched.
It starts off as
local Nub = script.Parent
local Handle = Nub.Handle
and towards the end of the script, after initialising the onTouched function to do the stuff he wants, it goes
Handle.Touched:connect(onTouched)
If I put something like print(Nub)
and print(Nub.Parent)
it returns the Handle and the tool’s name “Nub”; this script is situated within the handle.
However, everytime the tool is used, it spawns the little head like the other script is supposed to, which then activates the onTouched function, but it then returns “Handle is not a valid member of Part” at line 2. This is odd, as I already defined Handle and the script has ALREADY recognised this. Quite honestly I have no clue why this is doing such a thing. Does anyone have any idea why this is happening?
Now, I took this on thinking it was some typo or something, but I am actually quite confused; I’m not new to scripting and I’ve been doing it for many years, but this is just- odd? Not sure if I’ve just had a really long day and I’m not in the right mind set, but I don’t understand why this is happening, quite honestly.