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.
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?