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

How would I add gear to all alive players inventory?

I would like to know how I could give every alive person a gear in the StarterGear

The code here is what I've got so far.

function SM()
if CGUI.Swordsman.Value.Value == 1 then
	game.Players:GetChildren()
else
	end
end

1 answer

Umm I think you want something like this:

for i, v in pairs(game.Players:GetChildren()) do
  repeat wait() until v.Character.Humanoid
  if v.Character.Humanoid.Health != 0 then
    -- Player is alive
  else
    -- Player is dead.
  end
end

I haven't tested this because I'm on my chromebook at school but I'll test it at home later today if I get time and update it. PM me if you have question on this or just comment.

1 comment

0

i want to give a gear to the people that are alive

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