alex65594
|
  |
| Joined: 06 Feb 2011 |
| Total Posts: 24 |
|
|
| 17 Sep 2014 04:23 PM |
| Hi, I recently started studying the lua language and created my first game. But it is not done yet. I created most of the game's script.I need help with giving players on a certain team certain tools and removing them after they're not on the team anymore. I also need help with giving certain players on a certain team rewards once they are on the team and giving them the same rewards if they leave and join the team again. Any help is appreciated. :) |
|
|
| Report Abuse |
|
|
demon8845
|
  |
| Joined: 07 Feb 2010 |
| Total Posts: 335 |
|
|
| 17 Sep 2014 04:56 PM |
| I know for sure that this sub forum only fixes scripts not makes. |
|
|
| Report Abuse |
|
|
alex65594
|
  |
| Joined: 06 Feb 2011 |
| Total Posts: 24 |
|
| |
|
domogomo
|
  |
| Joined: 03 Jun 2012 |
| Total Posts: 335 |
|
|
| 17 Sep 2014 06:38 PM |
| I know for sure that this sub forum only fixes scripts not makes. |
|
|
| Report Abuse |
|
|
alex65594
|
  |
| Joined: 06 Feb 2011 |
| Total Posts: 24 |
|
|
| 17 Sep 2014 07:04 PM |
Here's my a bit of my script: __________________________________________________________________________ for i=1, #a do if a[i].TeamColor==BrickColor.new(1010) then a[i].Character.Torso.CFrame = CFrame.new(Vector3.new(121, 43.4, -51.6)) elseif a[i].TeamColor==BrickColor.new(37) then a[i].leaderstats.Credits.Value = a[i].leaderstats.Credits.Value + 30 a[i].leaderstats.Wins.Value = a[i].leaderstats.Wins.Value + 1 wait(2) _________________________________________________________________________ How do I make it so it will effect all players on the team. Right now it only affects one player on the team. Please help!! |
|
|
| Report Abuse |
|
|
alex65594
|
  |
| Joined: 06 Feb 2011 |
| Total Posts: 24 |
|
| |
|
alex65594
|
  |
| Joined: 06 Feb 2011 |
| Total Posts: 24 |
|
| |
|
alex65594
|
  |
| Joined: 06 Feb 2011 |
| Total Posts: 24 |
|
| |
|
alex65594
|
  |
| Joined: 06 Feb 2011 |
| Total Posts: 24 |
|
| |
|
|
| 18 Sep 2014 07:17 AM |
We typically don't do scripts for you. http://wiki.roblox.com/ might be able to help you learn though :D |
|
|
| Report Abuse |
|
|
alex65594
|
  |
| Joined: 06 Feb 2011 |
| Total Posts: 24 |
|
|
| 18 Sep 2014 07:31 AM |
for i=1, #a do if a[i].TeamColor==BrickColor.new(1010) then a[i].Character.Torso.CFrame = CFrame.new(Vector3.new(121, 43.4, -51.6)) elseif a[i].TeamColor==BrickColor.new(37) then a[i].leaderstats.Credits.Value = a[i].leaderstats.Credits.Value + 30 a[i].leaderstats.Wins.Value = a[i].leaderstats.Wins.Value + 1 wait(2) _________________________________________________________________________________ What I meant was to fix this script so instead of only affecting one player at 1 time I want it to affect all players at one time. |
|
|
| Report Abuse |
|
|
|
| 18 Sep 2014 07:39 AM |
| I think the table A only have one player |
|
|
| Report Abuse |
|
|
|
| 18 Sep 2014 07:44 AM |
a = game.Players:GetPlayers() for i=1, #a do pcall(function() if a[i].TeamColor==BrickColor.new(1010) then a[i].Character.Torso.CFrame = CFrame.new(Vector3.new(121, 43.4, -51.6)) elseif a[i].TeamColor==BrickColor.new(37) then a[i].leaderstats.Credits.Value = a[i].leaderstats.Credits.Value + 30 a[i].leaderstats.Wins.Value = a[i].leaderstats.Wins.Value + 1 end end) end |
|
|
| Report Abuse |
|
|