Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

This is a script where when you chat "reset" it kills u. Help?

Asked by 10 years ago
game.Players.PlayerAdded:connect(function(player)
  player.Chatted:connect(function(msg)
    if msg == "reset" then
      player.Humanoid.Health = 0
    end
  end)
end)

2 answers

Log in to vote
2
Answered by 10 years ago
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(char)
player.Chatted:connect(function(msg)
if msg == "reset" then
char.Humanoid.Health = 0
end
end)
end)
end)

I dont really know if this gonna work.

Ad
Log in to vote
0
Answered by 10 years ago

I'm still figuring out this kind of thing myself, but I think I'd probly do this;

game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(msg)
if msg == "reset" then
player.Charcter:BreakJoints()
end
end)
end)

Sorry if this wasn't what you were looking for.

Answer this question