Adonis custom plugins permissions error

Anyone that I perm admin cannot run the command, saying “not allowed to run” Plugin example: Here

I have no idea why this happens if anyone could tell me thanks

1 Like

Hello, if you could retake the picture but make the comments on the side of the AdminLevel line I think I would be able to help!

1 Like
	server.Commands.MusicChangeCommand = {
		Prefix = server.Settings.Prefix;	-- Prefix to use for command
		Commands = {"MusicChange"};	-- Commands
		Args = {"SoundId"};	-- Command arguments
		Description = "Custom Music";	-- Command Description
		Hidden = false; -- Is it hidden from the command list?
		Fun = false;	-- Is it fun?
		AdminLevel = "Admins";	    -- Admin level; If using settings.CustomRanks set this to the custom rank name (eg. "Baristas")
		Function = function(plr,args)    -- Function to run for command
			game.ReplicatedStorage.Events.ServerCommunicationsEvent:Fire("PlaySound",args[1])
		end
	}

I looked deeper into Adonis and how custom commands work, etc and I could not identify the problem. If I were you, I’d just make a Script in game.ServerScriptService and inside put:

local Sound = Instance.new("Sound", workspace.Baseplate) -- Set this to a random part in you're game
Sound.EmitterSize = 100000
Sound.Name = "Music"

local Admins = {"RVVZ"} -- You'd have to manually insert the Admins :(

game.Players.PlayerAdded:Connect(function(Player)
	for i, v in ipairs(Admins) do
		if v == Player.Name then
			Player.Chatted:Connect(function(Message)
				local LoweredMessage = string.lower(Message)
				if LoweredMessage:sub(1, 13) == ";musicchange " then
					local ID = tonumber(LoweredMessage:sub(14))
					Sound:Stop()
					Sound.SoundId = "rbxassetid://"..ID
					Sound:Play()
				end
			end)
		end
	end
end)

Did you mean to put FireServer and not Fire?

No it is a serverscript and thats a bindableEvent dont worry

it’s really strange idk how to fix it, it would be such a pain to make a whole admin list like that because like you said in that you’d have to manually insert admins into the script, and thats hard to do if you have a big game and need to update those sorts of things constantly.

Can your admins run other commands fine such as “kick”? Can the game creator run the command fine? Does the command show up properly when you run “:cmds”? Are you using a custom module or are you using the original one? There could be a few incorrect things here.

No, literally just reinstalled adonis and set the EXAMPLE plugin admin level to “Admins” and it still doesnt work for others, only me. I :permadmin’d them and everything and even when I add them in the settings script list nothing changes.

Well then, turns out they have a newer Adonis module, I thought that the other ones were fakes but I checked the description. This has solved the problem, sorry about this mess lol.