You check if there is a player with the name, but you never assign the player to the 'theTarget' variable.
addEvent("onPlayerIsMute", true)
function mutePlayer(theTarget, muteTime)
theTarget = getPlayerFromName(theTarget)
if (isElement(target)) then
if theTarget ~= nil and isObjectInACLGroup("user."..getAccountName(getPlayerAccount(client)), aclGetGroup("MOD")) then
if tonumber(muteTime) > 0 and tonumber(muteTime) < 121 then
setPlayerMuted(theTarget, true)
end
end
end
end
addEventHandler("onPlayerIsMute", root, mutePlayer)