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

GUI Color won't change via script, why?

Asked by 5 years ago

GUI color won't change via a script, why is that?

game.Workspace.Status.Red.Value == true then script.Parent.TextColor3 = 255, 98, 98
1
Check TextColor3 Asher0606 36 — 5y

1 answer

Log in to vote
1
Answered by
Y_VRN 246 Moderation Voter
5 years ago
Edited 5 years ago

[EDIT] Fixed a mistake:

There are two ways to use Color3: .new and .fromRGB.

Color3.new:

if game.Workspace.Status.Red.Value == true then 
    script.Parent.TextColor3 = Color3.new(255/255, 98/255, 98/255)
end

This method needs values of 0 to 1.

Color3.fromRGB:

if game.Workspace.Status.Red.Value == true then 
    script.Parent.TextColor3 = Color3.fromRGB(255, 98, 98)
end

This method uses normal RGB (Red, Green, Blue) values.

0
I tried and this didn't work Michael_TheCreator 166 — 5y
0
Does it output white? Y_VRN 246 — 5y
0
Yes Michael_TheCreator 166 — 5y
0
Edited. Y_VRN 246 — 5y
Ad

Answer this question