I am currently working on a club and I am trying to use point lights as a rainbow effect. It works in the studio but not in the actual game. Help!

local t = 4; --how long does it take to go through the rainbow

local ttick = tick()
local fromHSV = Color3.fromHSV
local RunService = game:GetService("RunService")
local Frame = script.Parent

RunService:BindToRenderStep("Rainbow", 1000, function()
	local hue = ttick % t / t
	local color = fromHSV(hue, 1, 1)
	script.Parent.PointLight.Color = color
end)

3 comments

0

Why noy just use the tween service?

0

Is this a local script and where is it located

0

Its a server script and its located in a part thats grouped.