Okay so, I’m having this bug with my tool, it says that Hold isn’t a valid member off the tool, here is my script and also the output in the bottom.
try printing the script’s parent like so before you define hold:
print(script.Parent)
to help figure out the problem.
If this is being cloned into the player then the children may not have loaded in for the client. You should use script.Parent:WaitForChild("Hold")
and such for your animations.
That will literally just print script.Parent
(you wrapped it in quotes )
yes I know, I was seeing if the scripts parent some how changed.(oh wait I see what you mean silly me).
You don’t understand. It will print script.Parent
as a string. Not the Parent of the script, but the literal script.Parent
. Oh you edited ok
no I understand what I did wrong, thanks though (anyways lets stay on topic, your “WaitForChild” instance I believe is the answer to his problem).
Oh okay. I’ll try that and see if it works.
to go along with what @wow13524 said, make sure you use the WaitForChild instance for defining values as well, like a currency your character has.
what line is this happening in to be super clear?
You either never declared lol, or its value was changed in another function not shown in the screenshot.
Pic says line 31.
It’s happening in local MicClone = lol:Clone()
line 31.
ok thanks, @DeveloperHax is this suppose to be a tool that clones into the player? if so make sure you determine where the original model is.
Let me check If i’ve declared it in any of my other scripts
The variable lol
must be declared inside of the same script, either within the function in the same scope or globally within the script (such as at the top).
Oh okay, let me try and see if that works.
if your original model is in serverstorage then try:
local MicClone = game.ServerStorage.lol:Clone()
^Bad practice. If such a tool is moved somewhere else then searching through all of your scripts for an invalid reference will suck. Having a one-time reference is better.