Adonis Admin Plugin Doesn't Work

I’m using Adonis admin script by @Davey_Bones. As you may know, Adonis allows you to customise the admin script by using what are called plug-ins as pictured below.

What I’m trying to do is create an admin game where players automatically receive admin when they join a server. The way I’m doing this is through a plug-in. The script has worked before, but after a long time since I last used it, I found out that it does not work anymore.

Here’s what I’ve written for the plug-in script (it’s called Server: Free Admin) in the picture.

server = nil 
service = nil
return function()
        print("Hello")
	game:GetService("Players").PlayerAdded:Connect(function(player)
		if not server.Admin.CheckAdmin(player) then
			server.Admin.SetAdmin(player, 1)
                        print("Goodbye")
		end
	end)
end

What happens is I don’t get any free admin at all (btw I’m testing this with another account, so I don’t get auto admin by being the game owner). It prints “Hello”, but not “Goodbye”.

Any help is appreciated, thanks.

1 Like

I’m pretty sure the function you’re looking for is SetLevel, not SetAdmin.

Thank you for correcting that, you’re absolutely right. Unfortunately, this did not solve the problem.

The script is now:

server = nil -- Mutes warnings about unknown globals
service = nil
return function()
	print("Hello")
	game:GetService("Players").PlayerAdded:Connect(function(player)
		if not server.Admin.CheckAdmin(player) then
			print("Check")
			server.Admin.SetLevel(player, 1)
			print("Goodbye")
		end
	end)
end

It still only prints “Hello”. I didn’t get any admin, any help?

Weird, just tested the script and it worked perfectly fine for me.

Do you mind teamcreating with me? You can reach me on Discord at soop#6434.