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

Random color Script Not working?

Asked by
korj5 0
10 years ago
1while true do
2    local title = game.StarterGui.Start.Title
3title=Color3.new(math.random(),math.random(),math.random())
4wait(0.5)
5end

These not working? How I can make it to random color on gui screen..

1 answer

Log in to vote
2
Answered by
Perci1 4988 Trusted Moderation Voter Community Moderator
10 years ago

You have two problems.

The first is that you're making your changes in StarterGui, but StarterGui is not what a player sees. It is simply a holder for GUI objects that will later be cloned into your PlayerGui. The PlayerGui is what you see.

The second is that your title variable equals an object, not a property. In this case, you need to use the BackgroundColor3 property.

Just put a local script inside the GUI object with similar code;

1while true do
2    wait(0.5)
3    script.Parent.BackgroundColor3 = Color3.new(math.random(),math.random(),math.random())
4end
0
Oh, it is work now! Thank you so much! korj5 0 — 10y
Ad

Answer this question