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 » Scripters
Home Search
 

Re: Creating a timer using booleans, won't connect

Previous Thread :: Next Thread 
sorder234 is not online. sorder234
Joined: 22 Jun 2009
Total Posts: 23
20 Nov 2016 03:18 PM
I am making a player gui timer on the top of the players screen, which I am trying to set so when a Boolean value in the players backpack is set to false it starts. The block that makes the Boolean value false is working fine, but every time I try to make a loop code to trigger from the action it won't connect.

This is the code that connects it(game.Players.Player1.PlayerGui.ScreenGui.timerGUI.Script):

while (script.Parent.Parent.Parent.Parent.Backpack.TIMER1.Value == false) do
script.Parent.Text = "testing"
end

the TIMER1 is in the players backpack, which is the Boolean value, and I get no errors when I run this or test it, the timerGUI text just doesn't budge :/
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
20 Nov 2016 03:19 PM
https://forum.roblox.com/Forum/ShowPost.aspx?PostID=199493287


Report Abuse
caca50 is not online. caca50
Joined: 10 Jul 2011
Total Posts: 2037
20 Nov 2016 03:21 PM
local player = game.Players.LocalPlayer

player.Backpack:WaitForChild('TIMER1').Changed:connect(function()
if player.Backpack.TIMER1.Value == false then
script.Parent.Text = 'testing'
end
end)


Roblox.Forum.Scripters:1: bad argument #1 to 'intellect' (number expected, got nil)
Report Abuse
sorder234 is not online. sorder234
Joined: 22 Jun 2009
Total Posts: 23
20 Nov 2016 03:27 PM
Ok that worked way better, so how come the while do method doesn't update from the Boolean value? Just curious, but thank you for fix.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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