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
if script.Parent.IntValue.Value == 2 then script.Parent.Transparency = 1 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
while true do if script.Parent.IntValue.Value == 2 then script.Parent.Transparency = 1 wait() else script.Parent.Transparency = 0 end wait() end
HI, you forgot to put end. This is the fixed script:
if script.Parent.IntValue.Value == 2 then script.Parent.Transparency = 1 end