local Bruh = script.Parent while true do wait(1) Bruh.Color3 = ('0,255,0') wait(1) Bruh.Color3 = ('0,0,255') wait(1) Bruh.Color3 = ('255,0,0') wait(1) end
You cannot change an RGB value (Color3 value) like that.
You use fromRGB()
local Bruh = script.parent while true do wait(1) Bruh.Color = Color3.fromRGB(0,255,0) wait(1) Bruh.Color = Color3.fromRGB(0,0,255) wait(1) Bruh.Color = Color3.fromRGB(255,0,0) wait(1) end
Here:
local Bruh = script.Parent while true do wait(1) Bruh.BrickColor = BrickColor.new(0,255,0) wait(1) Bruh.BrickColor = BrickColor.new(0,0,255) wait(1) Bruh.BrickColor = BrickColor.new(255,0,0) end
HSV has hue as its first value. You could simply tween that value:
local TweenService = game:GetService("TweenService") local Part = workspace.Part local Info = TweenInfo.new(1,"Quad","Out",-1) --Except for repeat count, all default values TweenService:Create(Part,Info,{Color = Color3.fromHSV(1,1,1)}):Play()
Note: changing TweenInfo
's repeat count to a negative value will indefinitely loop the tween.
I'm not to good at color stuff but this might work. Also when posting code put it in a lua code block.
local Bruh = script.Parent while true do wait(1) Bruh.Color3 = Color3.fromRGB ('0,255,0') wait(1) Bruh.Color3 = Color3.fromRGB('0,0,255') wait(1) Bruh.Color3 = Color3.fromRGB('255,0,0') wait(1) end