if game.Workspace.Coretemps.Temp.Current.Value > 1600 then script.Parent.Decal.Transparency = 0 end if game.Workspace.Coretemps.Temp.Current.Value < 1600 then script.Parent.Decal.Transparency = 1 end
Im making a core that activated certain effects once the core gets above 1600 degrees. I made this script to make a decal appear, but when I test the game out, for some of the corridors, this works, but sometimes it doesn't???
Keep in mind that I have about 15 of these decals with this same script, and sometimes they all work sometimes they dont..? Cant understand why???
Put it in a changed event.
game.Workspace.CoreTemps.Temp.Changed:Connect(function(property) if game.Workspace.CoreTemps.Temp.Value > 1600 then script.Parent.Decal.Transparency = 0 else script.Parent.Decal.Transparency = 1 end end)
To edit it not working and so it doesn't have to change, try this
while wait() do if game.Workspace.CoreTemps.Temp.Value > 1600 then script.Parent.Decal.Transparency = 0 else script.Parent.Decal.Transparency = 1 end end