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: Simple Problem

Previous Thread :: Next Thread 
NetsFan0 is not online. NetsFan0
Joined: 17 Apr 2009
Total Posts: 2777
06 Aug 2014 02:25 PM
There is no output, but this doesn't work-

script.Parent.MouseButton1Click:connect(function()
players = game.Players:GetPlayers()
for i = 1, #players do
local text = players[i].PlayerGui.ScreenGui.TextLabel.Text
text = text +1
end
end)
Report Abuse
killajake25 is not online. killajake25
Joined: 31 Jan 2011
Total Posts: 1713
06 Aug 2014 02:28 PM
Text is a string, not a number.
Report Abuse
TeddyBauer is not online. TeddyBauer
Joined: 24 Jul 2014
Total Posts: 224
06 Aug 2014 02:29 PM
well..

local text = players[i].PlayerGui.ScreenGui.TextLabel.Text
text = text +1

all your doing is saying the text variable is the TextLabels text, and then performing math on that variable. You are not performing any math on any of the text-labels, your just saying "text=text+1" which does nothing to anyones text.Like i said, it just modifies that variable alone, no properties.

you can say:

players[i].PlayerGui.ScreenGui.TextLabel.Text=tostring(tonumber(players[i].PlayerGui.ScreenGui.TextLabel.Text)+1)
Report Abuse
NetsFan0 is not online. NetsFan0
Joined: 17 Apr 2009
Total Posts: 2777
06 Aug 2014 02:29 PM
so would this be better- tostring(pathtotext)
Report Abuse
NetsFan0 is not online. NetsFan0
Joined: 17 Apr 2009
Total Posts: 2777
06 Aug 2014 02:29 PM
tonumber(pathtotext) is what I meant lol
Report Abuse
NetsFan0 is not online. NetsFan0
Joined: 17 Apr 2009
Total Posts: 2777
06 Aug 2014 02:31 PM
I got it, thanks Teddy.
Report Abuse
TeddyBauer is not online. TeddyBauer
Joined: 24 Jul 2014
Total Posts: 224
06 Aug 2014 02:36 PM
nooooo problem! and remember THEYYYYYYYRRRRRRE GREAT!
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