|
| 24 Jul 2014 01:27 PM |
| I'm making a battle game, and you get to choose your team, but there's a team name "Choosing" and you have the rocket launchers there. Is there a way to make that team have unlimited force field? |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 24 Jul 2014 01:29 PM |
SpawnLocations (spawns) have a property called "ForceFieldDuration". You can make that number ridiculously large (math.huge), or you could just find out how to create a ForceField object and parent it to each spawning player on that team. I'd use functions for that second method.
-I just hit 4k posts, made a lengthy speech lol: http://www.roblox.com/Forum/ShowPost.aspx?PostID=141338105- |
|
|
| Report Abuse |
|
|
|
| 24 Jul 2014 01:29 PM |
-Loop through le team -Check if on team -CharacterAdded event -Insert FF |
|
|
| Report Abuse |
|
|
|
| 24 Jul 2014 01:30 PM |
@max
that speech is useless, who makes a speech at 4k???? |
|
|
| Report Abuse |
|
|
GollyGreg
|
  |
| Joined: 22 May 2008 |
| Total Posts: 21835 |
|
|
| 24 Jul 2014 01:36 PM |
--real choppy code ahead function isOnTeam(Player, TeamColor) return Player.TeamColor == BrickColor.new(TeamColor) end
--now that we have a isOnTeam method, we can use --this to award a ForceField
game:GetService("Players").PlayerAdded:connect(function(Player) --CharacterAdded will fire every respawn Player.CharacterAdded:connect(function(Character) if isOnTeam(Player, "White") then --this lil bit adds the ForceField until we destroy it local ForceField = Instance.new("ForceField", Character)
--now to wait until the TeamColor changes Player.Changed:connect(function() if not isOnTeam(Player, "White") then ForceField:Destroy() end end) end end) end) |
|
|
| Report Abuse |
|
|
maxomega3
|
  |
| Joined: 11 Jun 2010 |
| Total Posts: 10668 |
|
|
| 24 Jul 2014 01:37 PM |
@duel, because i'm not doing it for 5k, and i can do what i want. gg |
|
|
| Report Abuse |
|
|
|
| 24 Jul 2014 01:38 PM |
"because i'm not doing it for 5k, and i can do what i want. gg"
you can do what you want but what you do can be stupid as well and is
ggnore |
|
|
| Report Abuse |
|
|