Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Script working but the decal transparency doesnt change help?

Asked by 2 years ago

the variable Strength is the decal.

local Wire = script.Parent
local Strength = script.Parent.unpowered.Transparency   

Strength = 0.0666 * Wire:GetAttribute("SignalStrength")

Wire:GetAttributeChangedSignal("SignalStrength"):Connect(function()
    Strength = 0.0666 * Wire:GetAttribute("SignalStrength")
end)

1 answer

Log in to vote
0
Answered by
Befogs 113
2 years ago

As I've answered in your previous question, you're storing the transparency value in the Strength variable, and you only update that variable. What you should be doing is updating the transparency directly.

script.Parent.unpowered.Transparency = 0.0666 * Wire:GetAttribute("SignalStrength")

0
At first i did not understand what this meant but know i know. Thank you for the help! ohhophophoplikebunny 25 — 2y
Ad

Answer this question