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: SurfaceGUI Counter

Previous Thread :: Next Thread 
ProgrammingUniverse is not online. ProgrammingUniverse
Joined: 01 Dec 2010
Total Posts: 764
06 Nov 2014 02:26 PM
I'm trying to make a SurfaceGUI that counts the amount of times you shoot a ball. However I don't know how to make the count add to the TextLabel.


local p = script.Parent +1
local c = script.Parent.Parent

for i,v in pairs(c) do
if p then
c = c + 1
end
end


Value is in the TextLabel.

Can anyone help me with this? What am I doing wrong?
Report Abuse
ProgrammingUniverse is not online. ProgrammingUniverse
Joined: 01 Dec 2010
Total Posts: 764
06 Nov 2014 02:31 PM
Any help?
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
06 Nov 2014 02:34 PM
'What am I doing wrong? '

'script.Parent+1'--script.Parent is a object, did you mean script.Parent.Value?

c =c+1--doesn't change the object, and are you trying to check if its == p?

while wait() do
local p = script.Parent.Value+1
local c = script.Parent.Parent:children()
for I,v in pairs(c) do
if v.Value == p then
v.Value = v.Value+1
end
end
end

--if not, ya lost me
Report Abuse
ProgrammingUniverse is not online. ProgrammingUniverse
Joined: 01 Dec 2010
Total Posts: 764
06 Nov 2014 02:37 PM
Oh I see what's wrong now, thanks.

But now that you told me that, it cancelled out my script that when it touches the ball, it adds it.

local p = script.Parent.Value
for i,v in pairs(game.Workspace.Globe) do
if function
(onTouch)
p = p + 1
end

Did I do something wrong here?
Report Abuse
ProgrammingUniverse is not online. ProgrammingUniverse
Joined: 01 Dec 2010
Total Posts: 764
06 Nov 2014 02:42 PM
If anyone helps me with that one, that'd be swell xD
Report Abuse
ProgrammingUniverse is not online. ProgrammingUniverse
Joined: 01 Dec 2010
Total Posts: 764
06 Nov 2014 02:48 PM
If someone is willing to help me with this, I'd gladly put credit to you.
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