My script is just to pick a random person in Terrorist team and Give him a C4 bomb
local TT = game.Teams.Terrorist:GetChildren() c4Terrorist = TT[math.random(1 , #TT)] game.ReplicatedStorage.C4Bomb:Clone(c4Terrorist.Backpack) game.ReplicatedStorage.C4Bomb:Clone(c4Terrorist.StarterGear)
my computer show error like missing interval
A team does not have children. The players on a team are not children of the team; they remain children of the Players service.
Regardless, if there are no such children, math.random(1,0)
will error. You must check that there is a choice before continuing.
local team = {}; for _,player in pairs(game.GetChildren(game:GetService"Players")) do if player.TeamColor == game:GetService("Teams")["Team Name"]).TeamColor then table.insert(team,player); end end
You also have poor taste.