It is not working for some reason? Please help if you can.
01 | if v:FindFirstChild( "6" ) then |
02 | for _, v 2 in pairs (v:GetChildren()) do |
03 |
04 | if v 2 :FindFirstChild( "BeamOne" ) then |
05 | v 2. BeamOne.Color = ColorSequence.new(Color 3. fromRGB(Data.SlashColor 2. Value), Color 3. fromRGB(Data.SlashColor 2. Value)) |
06 | end |
07 |
08 | if v 2 :FindFirstChild( "BeamTwo" ) then |
09 | v 2. BeamTwo.Color = ColorSequence.new(Color 3. fromRGB(Data.SlashColor 3. Value), Color 3. fromRGB(Data.SlashColor 3. Value)) |
10 | end |
11 |
12 | if v 2 :FindFirstChild( "BeamThree" ) then |
13 | v 2. BeamThree.Color = ColorSequence.new(Color 3. fromRGB(Data.SlashColor 4. Value), Color 3. fromRGB(Data.SlashColor 4. Value)) |
14 | end |
15 | end |
16 | end |
try this:
01 | local v = script.Parent |
02 | --// this Data table isnt needed since you have your own? its a way for me to debug the code |
03 | local Data = { |
04 | SlashColor 2 = { Value = Color 3. fromRGB( 0 , 255 , 255 ) } , |
05 | SlashColor 3 = { Value = Color 3. fromRGB( 255 , 0 , 255 ) } , |
06 | SlashColor 4 = { Value = Color 3. fromRGB( 255 , 168 , 64 ) } |
07 | } |
08 | if v:FindFirstChild( "6" ) then |
09 | local Six = v [ "6" ] |
10 | if Six:FindFirstChild( "BeamOne" ) then |
11 | Six.BeamOne.Color = ColorSequence.new( { |
12 | -- this would normally be something like |
13 | --[[ |
14 | Key: (Time to show color, The color to show ) |
15 | ColorSequenceKeypoint.new(0 ,Color3.new(255,128,0), |
Hope this helps! :)