I'm currently trying to create an onTouch script that adds a player to the TempAdmins table for Kohl's Admin Commands V5
Tables:
set['Owners'] = {"Your Name Here"} -- Are able to set Admins who can ban/etc... using :pa name
set['Admins'] = {} -- Sets Admins who can use ban/kick/admin or shutdown
set['TempAdmins'] = {} -- Sets Admins who can't use ban/kick/admin or shutdown
set['BanList'] = {'Test_User123=1235674'} -- Add people to ban here. Format to use UserId is "Name=UserId" EX: "John32=192845", this bans any player named John32 or has an id of 192845 (This way they can't bypass the ban by changing their username) use $group=GROUPID to ban groups.
set['MuteList'] = {} -- Add the names of people to mute (makes it so they cant talk)
I put this code at the end of the script, hoping that it would set the player to temp admin.
`function onTouched(hit)
if addeb == false then
addeb = true
script.Parent.Parent.Name = "Your an Admin, Try :cmds"
table.insert(set['TempAdmins'],player.Name)
wait(3)
script.Parent.Parent.Name = "Touch For Admin!"
end
script.Parent.Touched:connect(onTouched)
end`
Some help would be appreciated.

1 comment
Swap Line 10 and 11. The end should be before the event. Line 5: it's "hit.Parent.Name" not "player.Name"