Problem making chat command for acts

Like the title says, I have problems making chat commands for the Garry’s Mod acts.
I get this error when the code below is executed: FCVAR_SERVER_CAN_EXECUTE prevented server running command: act



hook.Add( "PlayerSay", "actcommands", function( ply, text, public )
	text = string.lower(text)
	if (text == "!dance") then
		ply:ConCommand("act dance")
		return ""
	end
end )


From what I’ve read about this error, there’s nothing to do about it, though I thought I would post with hopes of a solution.
Thanks in advance.

This means the server is unable to execute the command on the client. And there is no way to fix it.
Maybe try using net messages and use RunConsoleCommand()

Too bad.
Thanks for your reply :slight_smile: