It's a script that moves a door out of the way after 3 minutes. It's suppost to count down on the surface gui above the button. It isn't.
01 | Button = script.Parent.Parent.Parent.Button |
02 | Door = script.Parent.Parent.Parent.Parent.Door |
03 | Text = script.Parent.TextLabel.Text |
04 | function click() |
05 | local num = 180 |
06 | Text = num |
07 | for i = 1 , num do |
08 | num = num - 1 |
09 | print (Text) |
10 | wait( 1 ) |
11 | end |
12 | for i = 1 , 420 do |
13 | Door.CFrame = Door.CFrame *CFrame.new(-. 01 , 0 , 0 ) |
14 | wait(. 01 ) |
15 | end |
16 | end |
17 | script.Parent.Parent.Parent.Button.CD.mouseClick:connect(click) |
01 | Button = script.Parent.Parent.Parent.Button |
02 | Door = script.Parent.Parent.Parent.Parent.Door |
03 | Text = script.Parent.TextLabel.Text |
04 | function click() |
05 | local num = 180 |
06 | Text = num |
07 | for i = 1 , num do |
08 | num = num - 1 |
09 | script.Parent.TextLabel.Text = tostring (num) --Assuming textLabel is valid! |
10 | print (Text) |
11 | wait( 1 ) |
12 | end |
13 | for i = 1 , 420 do |
14 | Door.CFrame = Door.CFrame *CFrame.new(-. 01 , 0 , 0 ) |
15 | wait(. 01 ) |
16 | end |
17 | end |
18 | script.Parent.Parent.Parent.Button.CD.mouseClick:connect(click) |
Going off your issue, I'm assuming you never set the text. omething to note: "script.Parent.TextLabel.Text" Using that as a variable will not change by doing Text = "Blank"
Anyways, this should work. I set the TextLabel to update to Num