My admin script has a bug and i don't know why

Hello everyone so am making an admin script and for some reason, i get this error when I do the command:
and for some reason, the script find the tool but does not want to clone it: here the script


The tool to give doesn’t exist or isn’t findable.

I believe its because you are using a findTool function to find an instance when in reality WaitForChild needs a string not an instance.

1 Like

well is there a way to convert this to an string?

1 Like

Use the original ToolName

There is no need for the findTool function if you want to use WaitForChild

Read up on WaitForChild: Instance | Roblox Creator Documentation

1 Like

I want to use the find tool because if for example, I do !give all M16A it will go lookup for a tool with these letters and will automatically find M16Admin

Ok then you should not use WaitForChild at all since your findTool function already returns a instance.

I tried FindFirstChild and nowhere the error:

You dont need anything in that line

Your findTool function returns the instance already. You dont need a line 92…

Just rename local ToolToGive1 to Tool1 and your basically done

thank you it worked! thank you so much!

Of course, have a great day. And good luck with your admin system!