im trying to make a script that if an intvalue is 2, then this brick is not transparent, but it doesn't work. im a beginner dev btw
1 | if script.Parent.IntValue.Value = = 2 then |
2 | script.Parent.Transparency = 1 |
3 | end |
idk why it doesn't work, any help would be appreciated. thanks!
Yea the problem is that it only checks once and that is when the player joins try this
01 | while true do |
02 |
03 | if script.Parent.IntValue.Value = = 2 then |
04 | script.Parent.Transparency = 1 |
05 | wait() |
06 | else |
07 | script.Parent.Transparency = 0 |
08 | end |
09 | wait() |
10 | end |
HI, you forgot to put end. This is the fixed script:
1 | if script.Parent.IntValue.Value = = 2 then |
2 | script.Parent.Transparency = 1 |
3 | end |