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

how do kick command with theese settings?

owner = ("dragojake1013") -- the owner

admins = ("meltdown878") -- the admins

prefix = (":") -- you can change the prefix

function onchatted ()

end

(this is were the function goes but not in parenthisies)

im no sure what o do here but i now its something onchatted

1 comment

0

Please use proper grammar. Plus it's easy. Just follow the wiki

1 answer

✓ Accepted answer

You need to detect who spoke, if they can call commands, if the command was kick, who they are trying to kick, and lastly you need to shut down their client (roblox has an method, :Kick(), designed specifically for this).

local canUseCommands = {PlayerName, OtherPlayerName, AnyotherPlayerName}

game.Players.PlayerAdded:connect(function(player)
	player.Chatted:connect(function(message)
		if message == 'kick/' and canUseCommands[player.Name] then
			if game.Players:FindFirstChild(string.sub(msg, 6)) then
				game.Players:FindFirstChild(string.sub(msg, 6)):Kick()
			end
		end 
	end
end)

2 comments

0

thanks that helped

0

No problem :)

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