miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 29 Aug 2011 05:01 PM |
game.Players.PlayerAdded:connect(function(Player) local InA = Instance.new("IntValue",Player) InA.Name = "leaderstats" InA.Value = 0 local InB = Instance.new("IntValue",InA) InB.Name = "Squirter Goals" InB.Value = 0 local InC = Instance.new("IntValue",InA) InC.Name = "Magma Goals" InC.Value = 0 game.Workspace.Goal.Touched:connect(function(hit) game.Workspace.Goal1.Touched:connect(function(hit1) if hit.Name == "Socca" then InB.Value = InB.Value +1 if hit.Name == "Socca" then InC.Value = InC.Value +1 end end end) end) end)
Ok it works, but only for The InC value it works.Heres the thing.
When Socca(A soccer ball) touches goal(A part) its supposed to go value up by one.Which The InC values goes up but not the InB value.OH AND when the Magma goals go up the squirter goals go up to.Can anyone help? |
|
|
| Report Abuse |
|
|
|
| 29 Aug 2011 05:02 PM |
' game.Players.PlayerAdded:connect(function(Player) local InA = Instance.new("IntValue",Player) InA.Name = "leaderstats" InA.Value = 0 local InB = Instance.new("IntValue",InA) InB.Name = "Squirter Goals" InB.Value = 0 local InC = Instance.new("IntValue",InA) InC.Name = "Magma Goals" InC.Value = 0 game.Workspace.Goal.Touched:connect(function(hit) game.Workspace.Goal1.Touched:connect(function(hit1) if hit.Name == "Socca" then InB.Value = InB.Value +1 end if hit.Name == "Socca" then InC.Value = InC.Value +1 end end) ' end) end)
`-`_`The` `Epic` `Fissy`_  |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
| |
|
|
| 29 Aug 2011 05:20 PM |
game.Players.PlayerAdded:connect(function(Player) local InA = Instance.new("IntValue",Player) InA.Name = "leaderstats" InA.Value = 0 local InB = Instance.new("IntValue",InA) InB.Name = "Squirter Goals" InB.Value = 0 local InC = Instance.new("IntValue",InA) InC.Name = "Magma Goals" InC.Value = 0 game.Workspace.Goal.Touched:connect(function(hit) game.Workspace.Goal1.Touched:connect(function(hit1) if hit.Name == "Socca" then InB.Value = InB.Value +1 InC.Value = InC.Value +1 end end) end) end) |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
|
| 29 Aug 2011 05:23 PM |
@dark
It did the same thing before as the first script I made!
I have a question? I have two teams, do you think that's why it doesnt work?Or something like that? |
|
|
| Report Abuse |
|
|
|
| 29 Aug 2011 05:33 PM |
You know what. >.> Try this. game.Players.PlayerAdded:connect(function(Player) local InA = Instance.new("IntValue",Player) InA.Name = "leaderstats" InA.Value = 0 local InB = Instance.new("IntValue",InA) InB.Name = "Squirter Goals" InB.Value = 0 local InC = Instance.new("IntValue",InA) InC.Name = "Magma Goals" InC.Value = 0 end)
game.Workspace.Goal.Touched:connect(function(hit) if hit.Name == "Socca" then for i, v in pairs(game.Players:GetChildren()) do if v:findFirstChild("leaderstats") then v.leaderstats["Squirter Goals"].Value = v.leaderstats["Squirter Goals"].Value + 1 end end end end)
game.Workspace.Goal.Touched:connect(function(hit) if hit.Name == "Socca" then for i, v in pairs(game.Players:GetChildren()) do if v:findFirstChild("leaderstats") then v.leaderstats["Magma Goals"].Value = v.leaderstats["Squirter Goals"].Value + 1 end end end end) |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
| |
|
|
| 29 Aug 2011 05:46 PM |
game.Players.PlayerAdded:connect(function(Player) local InA = Instance.new("IntValue",Player) InA.Name = "leaderstats" InA.Value = 0 local InB = Instance.new("IntValue",InA) InB.Name = "Squirter Goals" InB.Value = 0 local InC = Instance.new("IntValue",InA) InC.Name = "Magma Goals" InC.Value = 0 end) game.Workspace.Goal.Touched:connect(function(hit) if hit.Name == "Socca" then for i, v in pairs(game.Players:GetChildren()) do if v:findFirstChild("leaderstats") then v.leaderstats["Squirter Goals"].Value = v.leaderstats["Squirter Goals"].Value + 1 end end end end) game.Workspace.Goal1.Touched:connect(function(hit) if hit.Name == "Socca" then for i, v in pairs(game.Players:GetChildren()) do if v:findFirstChild("leaderstats") then v.leaderstats["Magma Goals"].Value = v.leaderstats["Magma Goals"].Value + 1 end end end end) |
|
|
| Report Abuse |
|
|
miz656
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 15336 |
|
| |
|