Change something's colour with a GUI's colour

Hi, I would like to know how to change the colour of my lightsaber based on the colour picker gui. Currently it does not work and it comes with an error:

Unable to assign property Color. ColorSequence expected, got Color3

I don’t know what I am doing wrong. This is the code:

script.Parent.RemoteEvent.OnServerEvent:Connect(function(player)
	local char = player.Character
	local lightsaber = player.Backpack:FindFirstChild("Lightsaber") or char:FindFirstChild("Lightsaber")
	
	local r = script.Parent.Parent.ColourDisplay.ImageColor3.R
	local g = script.Parent.Parent.ColourDisplay.ImageColor3.G
	local b = script.Parent.Parent.ColourDisplay.ImageColor3.B
	lightsaber.Emitter.BeamOutside.Color = Color3.fromRGB(r,g,b)
end)

And this is a screenshot:
image

The ImageColor3 changes when you pick something from the color wheel.
And the “Lightsaber” is a beam.

Any help is appreciated.

oh… you need to use ColorSequence.new() for this

You need to use a ColorSequence.

how exactly would i do that? im confused on how to use colorsequence when i have an rgb value

i never use colorsequence nor numbersequence before

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.