ModuleScript unable to find a configuration object [Cmdr custom command]

I’m making a custom command for “Cmdr” [though i don’t think that is related to the problem.]
It all works fine except for when the server modulescript tries to find a configuration object in a tool. When running:

local cdName = selectedTool:WaitForChild("COOLDOWN_VALS").CooldownName.Value
    targetPlayer.PlayerGui.Cooldowns.CooldownsFrame:FindFirstChild(cdName.."Cooldown"):Destroy()
    selectedTool.Enabled = true

It just never finds the object, or if I use FindFirstChild, it can’t find it. The tool example is below.

P.S targetPlayer and toolSelected are both fully correct and working variables, I just don’t see how this cannot work. when the code is run in the server command console, it works fine.

Any help appreciated!

bump… random text cuz it has to be 300 characters

I think we need more info. I am a touch confused on what you are trying to get at.

I see that cdName should work, but I am unsure about the targetPlayer.PlayerGui.Cooldowns.CooldownsFrame and how that looks. Is this where you are having problems, that the cdName.."Cooldown" is not being destroyed?

is selectedTool a string value or a object value?

another reason for the issue can be that te tool is only on the client side so the server cant find it, or other way around.

its an object: Tool, the tool is on the server side.

i cant seem to find a solution i would recommend you just printing every value until you see one that isnt correct anymore.

what do you mean, every value??

Like constantly monitoring every value that impacts your result, or have you now managed to fix this issue?

yes i fixed it sorry, it was picking the wrong tool

Yes that is what i figured.

But since i couldnt see what every value you where showing was i couldnt tell you with 100% certainty.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.