generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Leaderboard.Help

Previous Thread :: Next Thread 
miz656 is not online. 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
TheNewFissy is not online. TheNewFissy
Joined: 03 Jan 2011
Total Posts: 1301
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`_ ![Scripter](http://t0ak.roblox.com/2d8317df1295d94b07f5934ca43b0ce1)
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
29 Aug 2011 05:16 PM
Didn't work :o
Report Abuse
darkkiller5555 is not online. darkkiller5555
Joined: 22 Nov 2009
Total Posts: 6359
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 is not online. 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
darkkiller5555 is not online. darkkiller5555
Joined: 22 Nov 2009
Total Posts: 6359
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 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
29 Aug 2011 05:41 PM
It did the same thing!!!!
Report Abuse
darkkiller5555 is not online. darkkiller5555
Joined: 22 Nov 2009
Total Posts: 6359
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 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
29 Aug 2011 05:50 PM
It worked, thanks :D
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image