So I have a brick with a surface light and I am currently trying to create a scrip that changes the color of the light so the pool could then changes colors. How would I go on doing this? Any help is thankful!
Are you wanting to just change that 1 Brick’s Color for the Water & Light to change? If so, I believe you can look at this? Environments and Terrain Tools) (Thanks ROBLOX)
Well to make them change to like a rotation, you could use a loop, again to rotate the colours.
local t = 5; --how long does it take to go through the rainbow
while wait() do
local hue = tick() % t / t
local color = Color3.fromHSV(hue, 1, 1)
--> set the color
end
You could probably do something relevant like this?
local SurfaceLight = workspace.Part.SurfaceLight
local Speed = 1
for Loop = 0, 1, 0.001 * Speed do
SurfaceLight.Color = Color3.fromHSV(Loop, 1, 1)
wait()
end
local TweenService = game:GetService('TweenService')
while true do
local tween = TweenService:Create(script.Parent, TweenInfo.new(.35), {Color = Color3.fromRGB(math.random(0, 255), math.random(0, 255), math.random(0, 255))})
tween:Play()
tween.Completed:Wait()
end