local color = script.Parent.BrickColor
color = script.Parent.light.Color
Basically, I want the color of the light to be the same as the colour of the brick.
Can somebody help me?
local color = script.Parent.BrickColor
color = script.Parent.light.Color
Basically, I want the color of the light to be the same as the colour of the brick.
Can somebody help me?
local Light = --define the light
Light.Color = script.Parent.Color
BrickColor will not index with the light as it uses Color3. Use Part.Color instead.
Doesn’t work, also the light is a beam and not a light.
Beams use ColorSequence.
You’ll need to set it to ColorSequence.new() instead.
And what would the script look like?
show the workspace of where light and the brick are.
local beam = --define it here
beam.Color = ColorSequence.new(script.Parent.Color)
[assuming you want a solid color and no gradient]
local beam = script.Parent.light
beam.Color = ColorSequence.new(script.Parent.Color)
Would this be the correct place, since it isn’t working?
What error output does that throw?
It doesn’t throw out any error output.
Strange, I’m not sure why it isn’t changing, as it should be printing something if there’s incorrect input.
If it’s any help, I’ll link the ColorSequence API Reference for you.
ColorSequence (roblox.com)
just run this, this worked for me :
local Part = game.Workspace.BeamPart
local Beam = Part.Beam
Beam.Color = ColorSequence.new(Part.Color)
you could use Part = Script.Parent
if the workspace looks like this
before:
after: