Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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.

2 comments

0

Use a code block :P

0

Make it Color3.new(255, 255, 255) instead

1 answer

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)

1 comment

0

You did around 75% of the script correctly, just few codes were on incorrect lines and there were few important codes missing

This discussion is preserved as it was. New answers, comments, and votes are closed.