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
|
  |
| 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
|
  |
| 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
|
  |
| 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 |
|
|