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: Help please

Previous Thread :: Next Thread 
LordOfTheAtoms is not online. LordOfTheAtoms
Joined: 22 Jul 2012
Total Posts: 4030
29 Oct 2013 11:45 AM
When I click the textbox it doesn't start the countdown there is no output to..

local time = 30
function onClick()
for i = 1,30 do
wait(1)
time = time - 1
script.Parent.Text = tostring(time)
end
end
script.Parent.Click:connect(onClick)
Report Abuse
CrniOrao is not online. CrniOrao
Joined: 12 Oct 2008
Total Posts: 2274
29 Oct 2013 11:47 AM
Text Boxes cannot be clicked on. They do not have that function.
Report Abuse
LordOfTheAtoms is not online. LordOfTheAtoms
Joined: 22 Jul 2012
Total Posts: 4030
29 Oct 2013 11:50 AM
Ooops sorry i meant textbutton
Report Abuse
CrniOrao is not online. CrniOrao
Joined: 12 Oct 2008
Total Posts: 2274
29 Oct 2013 11:53 AM
Maybe like this? (Connection line fixed)

local time = 30
function onClick()
for i = 1,30 do
wait(1)
time = time - 1
script.Parent.Text = tostring(time)
end
end
script.Parent.MouseButton1Down:connect(onClick)


If it won't work try replacing tostring(time) with "" ..time
Report Abuse
LordOfTheAtoms is not online. LordOfTheAtoms
Joined: 22 Jul 2012
Total Posts: 4030
29 Oct 2013 11:53 AM
TextButton doesn't work what do i use?
Report Abuse
CrniOrao is not online. CrniOrao
Joined: 12 Oct 2008
Total Posts: 2274
29 Oct 2013 11:56 AM
Try this, I removed "local" because you do not use multiple time defining in many functions and I've also replaced the text.

time = 30
function onClick()
for i = 1,30 do
wait(1)
time = time - 1
script.Parent.Text = "" ..time
end
end
script.Parent.MouseButton1Down:connect(onClick)
Report Abuse
LordOfTheAtoms is not online. LordOfTheAtoms
Joined: 22 Jul 2012
Total Posts: 4030
29 Oct 2013 12:01 PM
Nope...
Report Abuse
CrniOrao is not online. CrniOrao
Joined: 12 Oct 2008
Total Posts: 2274
29 Oct 2013 12:18 PM
time = 30
function onClick()
for i = 30, 1 do
wait(1)
time = time - i
script.Parent.Text = "" ..time
end
end
script.Parent.MouseButton1Down:connect(onClick)
Report Abuse
LordOfTheAtoms is not online. LordOfTheAtoms
Joined: 22 Jul 2012
Total Posts: 4030
29 Oct 2013 12:25 PM
Quick question, does this have to be in a script or Local script?
Report Abuse
CrniOrao is not online. CrniOrao
Joined: 12 Oct 2008
Total Posts: 2274
29 Oct 2013 12:26 PM
Normal script.
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