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

How do I make a local player kill script?

function onChatted(message, speaker)
	local player = speaker.Character
	local msg = string.lower(message)
	if msg == "chathere" then
		player.CharacterAppearance = 6315210
end

I'm making a command script that when you say "chathere", it changes your appearance to the ID specified in "player.CharacterAppearance = 6315210".

How do I make it that it will kill the local player afterwards?

4 comments

0

does the script work so far, so they get the characterappearance??

0

Dude don't down rate for getting the question wrong you noob. Down rated for unfair rating and reporting to admins, don't just down rate cause someone tried and they didnt get it right, you are no where close to killing the player so you have no right

0

Sorry for late reply. NinjoOnline, it says on "newplayer" that "W001: Unknown global" in the script editor.

0

Also, I didn't down rate your answer.

2 answers

function onChatted(message, speaker)
    local player = speaker.Character
    local msg = string.lower(message)
    if msg == "chathere" then
        player.CharacterAppearance = 6315210
	game.Players:getPlayerFromCharacter(newplayer)
		newplayer:BreakJoints()
	end
end

I believe this is what you want. If it isn't then please tell me and I can relook and give another one that should defiantly work

- NinjoOnline

function onChatted(message,speaker)
	local chr=speaker.Character
	local msg=string.lower(message)
	if msg=="chathere" then
		speaker.CharacterAppearance=6315210
		wait(1)
		chr.Humanoid.Health=0
	end

This answer was brought to you by Chipio Industries

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