hello. i am trying to make a script that makes a transparent part visible when a 25 seconds timer hits 0 but it doesn't work. this is my script:
01 | local timer = game.Workspace.Timer.SurfaceGui.TextLabel |
02 | local part = game.Workspace.saracie |
03 | while true do |
04 | if timer.Text = = "25" |
05 | then |
06 | part.Transparency = 1 |
07 | else |
08 | if timer.Text = = "0" then |
09 | part.Transparency = 0 |
10 | wait( 3 ) |
11 | part.Transparency = 1 |
12 |
13 | end |
14 | end |
15 |
16 | end |
01 | local PartInvis = false |
02 |
03 | while true do |
04 | if Partinvis = = true then |
05 | part.Transparency = 0 |
06 | PartInvis = false |
07 |
08 | else |
09 | Part.Transparency = 1 |
10 | PartInvis = true |
11 | end |
12 | wait( 25 ) |
13 | end |
All that's happening is this while loop will continuously run, but will pause for 25 seconds after running the code before running it again. The PartInvis is only used to determine whether at the time the code is running the part is transparent.
I didn't really understamd what you were saying, but anyway, here's a script that makes the part disappear every 25 seconds. Let me know if this helps. :)
01 | Part = script.parent |
02 | Part.Transparency = 0 |
03 | Part.CanCollide = true |
04 |
05 | while true do |
06 | Part.Transparency = 1 |
07 | Part.CanCollide = false |
08 | wait( 25 ) |
09 | Part = script.parent |
10 | Part.Transparency = 0 |
11 | Part.CanCollide = true |