zarifprox
|
  |
| Joined: 20 Nov 2012 |
| Total Posts: 176 |
|
|
| 07 Feb 2014 11:36 PM |
For my moving model/warrior/dog
debounce=true color=BrickColor.new("Bright red") colors={BrickColor.new("Nougat");BrickColor.new("Pastel brown");BrickColor.new("Brown");};
function tabFind(val,tablas) for i,v in pairs(tablas) do if val==v then return i; end end return 0; end
script.Parent.Touched:connect(function(part) if debounce then local a=game.Players:GetPlayerFromCharacter(part.Parent) if a and a.WarriorCount.Value<6 and a.TeamColor==color then debounce=false local b=game.Lighting.Warrior:clone() colo=colors[math.random(1,#colors)]; b.BC.HeadColor=colo; b.BC.LeftArmColor=colo; b.BC.RightArmColor=colo; b.Master.Value=a b.BC.LeftLegColor=color b.BC.RightLegColor=color b.BC.TorsoColor=color b.Shield.BrickColor=color b.wepo.Value=game.Lighting.sword; b.Parent=workspace b:MakeJoints() b:MoveTo(workspace.RedWSpawn.Position) a.WarriorCount.Value=a.WarriorCount.Value+1 local nameNom=math.floor(math.random(0,10000)); repeat nameNom=math.floor(math.random(0,10000)); until not (tabFind(nameNom,_G.takenNumbers)>0); b.Name=b.Name .. " " .. nameNom; local locr=false for i=1,6 do if not locr and not a[i].Value then locr=true a[i].Value=b b.Humanoid.Died:connect(function() a[i].Value=nil table.remove(_G.takenNumbers,tabFind(nameNom,_G.takenNumbers)); end ) end end a.changeitup.Value=not a.changeitup.Value Wait(2) debounce=true end end end ) |
|
|
| Report Abuse |
|
|
zarifprox
|
  |
| Joined: 20 Nov 2012 |
| Total Posts: 176 |
|
| |
|
yankeejr
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
|
| 08 Feb 2014 02:21 AM |
| color should be BrickColor.new I believe... |
|
|
| Report Abuse |
|
|
zarifprox
|
  |
| Joined: 20 Nov 2012 |
| Total Posts: 176 |
|
|
| 08 Feb 2014 03:36 AM |
| You mean this b.BC.HeadColor=colo; Should be b.BrickColor.new.HeadColor=colo; ? |
|
|
| Report Abuse |
|
|
zarifprox
|
  |
| Joined: 20 Nov 2012 |
| Total Posts: 176 |
|
| |
|