Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I finish off this kick command in my new admin script?

Good evening,

I am currently creating an admin system, and I would like some guidance on where to go from if msg:lower() == Prefix.."kick ". Specifically, I would like to know how to make the kick command work on other players.

	if p.AdminLevel.AdminValue.Value == "Moderator" or p.Admin.AdminValue.Value == "Administrator" or p.Admin.AdminValue.Value == "Super Administrator" or p.Admin.AdminValue.Value == "Owner" or p.Admin.AdminValue.Value == "Game Creator" then
		p.Chatted:Connect(function(msg)
			if msg:lower() == Prefix.."kick "
		end)
	end
end)

3 comments

0

So you can't kick other players, just yourself right?

0

I know how to make it kick myself, but what I need help with is to make the command be able to kick other players (e.g. :kick (playername))

0

Okay. I will try to figure it out, give me a minute.

1 answer

✓ Accepted answer

Finally, I found it! This website here should help you do it.

It says "onOwnerChatted" as a function, but you just have to change that to all players and add "if" so only Mods, Admins, Super Admins, Owner, and Game Creator can kick.

Something like:

if message:sub(1, kickCommand:len()):lower() == kickCommand:lower() and p.AdminLevel.AdminValue.Value == "Moderator" or....

If you want more help let me know, but it seems like you are a pretty good scripter and know what your doing.

2 comments

0

Much appreciated!

0

Np!

This discussion is preserved as it was. New answers, comments, and votes are closed.