Giving players on "Winning Team" SuperAdmin (Kohls)

Heya, so pretty much im trying to make a part, where when you step on it (.touched) it puts you on the winning team and gives you the “SuperAdmin” rank in Kohls admin. Anyways, I ran into an issue. I noticed that Kohls and every other Admin script has the tables where player userids/names for who is admin is stored in a ModuleScript and was wondering if there is a way to insert data from a serverscript into a modulescript. Thanks!

1 Like

or/ if anybody knows how the give rank commands work would be nice

local Module = require(Module)

table.insert(Module["Admins"],UserId/Name)

If table.insert doesn’t work then do

local Module = require(Modulepath)

local AdminsCache = Module["Admins"]
table.insert(AdminsCache,UserId/Name)
Module["Admins"] = AdminsCache

12:16:36.188 Workspace.Kohl's Admin Infinite.Credit:46: invalid argument #1 to 'insert' (table expected, got nil) - Server - Kohl's Admin Infinite:46

	local UserId = player.UserId
	local Module = require(script.Settings)
	local AdminCache = Module["SuperAdmins"]
	
	table.insert(AdminCache, UserId)
	Module["SuperAdmins"] = AdminCache
	
	print(Module["SuperAdmins"])
	print(Module["Owners"])

How come this doesnt seem to work?

It may be that the script which gives admin commands doesn’t actively check for new admins.

I’m not very familiar with Kohl’s Admin, but I would assume there’s a function in one of the modules where you can add Admins that way.

Maybe use Ctrl+F while in the modules and search for “Admin”

Its an error with the table.insert

This was done incorrectly, but in the post below you did it the right way.

Waiiiiiit, you didn’t put the correct index into my code and you didn’t change the UserId to the actual UserId of the player.

Yeah, im using a variable to get the userid of player

You tried this and it didn’t work?

Yup, tried it with a string and your exact index, also scroll up, I posted the error

My exact index won’t be right, I have no idea what the index is called.

Did you use the correct index here?

Yeah, in the settings script the table is indeed “SuperAdmins”

And you tried using that index and it didn’t work?

Yeah, thats the error I got if you scroll up.