Gui Not Enabling

Greetings! I’m making a chat command, and ran into a problem; The script works sometimes, but others it doesn’t. Here’s the code snippet (not the full one, nothing else is the problem)!

		elseif (string.lower(Message) == '/e cmds' and Configuration.Moderators[Player.UserId]) then
			Player.PlayerGui:WaitForChild("Dashboard").Enabled = true
		end

I’ve used pcall, but it still doesn’t work. Wonder why?

Ensure that the code is in a local script.

I have also heard that doing this could make it work in a server script:

Player.PlayerGui:WaitForChild("Dashboard").Enabled = false
wait()
Player.PlayerGui:WaitForChild("Dashboard").Enabled = true

It is a LocalScript, possibly I could try that, but it should detect it’s already disabled, which is why this is so odd.