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

How would I add gear to all alive players inventory?

Asked by 10 years ago

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

Log in to vote
0
Answered by
Savoron 15
10 years ago

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.

0
i want to give a gear to the people that are alive rabidhalofan12345 55 — 10y
Ad

Answer this question