Welp here it is. Please keep in mind that this is my FIRST REAL SCRIPT for a game.
while true do workspace.lunarbutton.brickcolor = BrickColor.blue workspace.lunarbutton.brickcolor = BrickColor.red
end
That's not how you declare the part's color. In order to do this, you have to use BrickColor.new. Here's one way how it works:
while true do -- declare the loop wait() -- make sure to add a wait() to avoid crashing workspace.lunarbutton.BrickColor = BrickColor.new("Bright blue") --We access the part's color and change it to bright blue wait(2) -- we wait a few seconds again workspace.lunarbutton.BrickColor = BrickColor.new("Really red") -- The part is now red. end
Another way to do this is by:
workspace.lunarbutton.BrickColor = BrickColor.Red() --This will make the part's color to red workspace.lunarbutton.BrickColor = BrickColor.Blue() -- This will turn blue
Keep in mind that there are other types of shades of blue and red. To access these colors, go on studio and you will find a list of colors with their corresponding names.
Also for more information, check these pages:
http://wiki.roblox.com/index.php?title=Color
http://wiki.roblox.com/index.php?title=BrickColor
Welcome to scripting, here is your script:
while true do workspace.lunarbutton.brickcolor = BrickColor.blue workspace.lunarbutton.brickcolor = BrickColor.red end
you already have some issues, while im short on time atm I will fix your code, comment or PM me and ill explain the changes.
function change() local brickname="Part" brick = game.Workspace:FindFirstChild(brickname) brick.BrickColor=BrickColor.Red() end change()
I hope it helps! -Sciptr