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

Help with this script?

Asked by 10 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

I was trying to do this because I made the script and when the storms transparency changed the gui text and text color did not I had to reset for it to update. Please help. I will give you the code here it should be simple.

local letters = script.Parent
local storm = game.Workspace.Storm

if storm.Transparency == 0 then
    letters.TextColor3 = Color3.new(255,0,0)
    letters.Text = "Rain Showers"
end

if storm.Transparency == 1 then
    letters.TextColor3 = Color3.new(0,255,0)
    letters.Text = "Clear Skies"
end

1 answer

Log in to vote
1
Answered by
Vitou 65 Snack Break
10 years ago

You may have forgot a loop to update the status of the "if" condition :

local letters = script.Parent
local storm = game.Workspace.Storm

while storm do
    if storm.Transparency == 0 then
        letters.TextColor3 = Color3.new(255,0,0)
        letters.Text = "Rain Showers"
    elseif
        storm.Transparency == 1 then
        letters.TextColor3 = Color3.new(0,255,0)
        letters.Text = "Clear Skies"
    end
    wait(0.1)
end

I hope it will fix your issue.

0
Let me try this. AWESOMEnoob3 3 — 10y
0
It worked thanks man. AWESOMEnoob3 3 — 10y
Ad

Answer this question