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

Kill command not working ( custom admin )?

kill = (function(sender, arguments,message, recipient) 
	if sender.AdminRankID.Value >= 1 then
		if arguments[2] then
			local target = findplayer(arguments[1])
			local char = target.Character
			char.Humanoid.Health = 0
		end
	end
end);

3 comments

0

what does it output

0

Idk,It odn't give me admin in studio,just in roblox game

0

Its just a typo in the script, it seems.

1 answer

It seems like your checking for arguments[2], when arguments[1] is the player. So. If you do /kill [user]. [User] seems to be arguments[1] and arguments[2] will be nil, stopping the script. Try changing if arguments[2] to if arguments[1]

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