Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can you fix this error? I tried to make a button to change the color of a Beam.

Asked by 6 years ago

HI, I'm Craig. I am having a problem with scripting.

I tried to make a Button that if you click it, the button will change the color of a beam. This is my script:

local Epic=script.Parent.ClickDetector function onClick() game.Workspace.Band.Beamm.Beam.Color = Color3.new(0/255,255/255,0/255) end Epic.MouseClick:connect(onClick)

The main thing I'm having problem is this line:

game.Workspace.Band.Beamm.Beam.Color = Color3.new(0/255,255/255,0/255)

Is there something wrong? Please help me.

0
Use a code block :P User#20388 0 — 6y
0
Make it Color3.new(255, 255, 255) instead LordTechet 53 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

Take this one:

local Epic=script.Parent
function onClick() 
game.Workspace.Band.Beamm.Beam.Color = Color3.new(255, 255, 255) 
end 

Epic.ClickDetector.MouseClick:connect(onClick)
0
You did around 75% of the script correctly, just few codes were on incorrect lines and there were few important codes missing LordTechet 53 — 6y
Ad

Answer this question