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:
The ImageColor3 changes when you pick something from the color wheel.
And the “Lightsaber” is a beam.
Any help is appreciated.