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
9 years ago
while true do
    local title = game.StarterGui.Start.Title
title=Color3.new(math.random(),math.random(),math.random())
wait(0.5)
end

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
9 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;

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

Answer this question