Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Help with this script?

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

✓ Accepted answer

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.

2 comments

0

Let me try this.

0

It worked thanks man.

This discussion is preserved as it was. New answers, comments, and votes are closed.