Incomplete statement: expected assignment or a function call Error on brickcolor only

  1. What do you want to achieve? I’m trying to make it, when you click a GUI it changes the color of a brick but it won’t work, even tho it was working a second ago.

  2. What is the issue? It keeps saying this in output “Incomplete statement: expected assignment or a function call” and it wont change the brickcolor, but it does change to Neon for the material?

  3. What solutions have you tried so far? Looked everywhere to find the answer but nothing will work for some reason.


local LedLight = game.Workspace:WaitForChild("LedLight")

local player = game.Players.LocalPlayer
local playergui = player:WaitForChild("PlayerGui")

local Off = playergui:WaitForChild("LEDLightsGui").Off
local On = playergui:WaitForChild("LEDLightsGui").Frame.On
	
local Red = playergui:WaitForChild("LEDLightsGui").Frame.RED
local Green = playergui:WaitForChild("LEDLightsGui").Frame.GREEN
local Blue = playergui:WaitForChild("LEDLightsGui").Frame.BLUE
local Orange = playergui:WaitForChild("LEDLightsGui").Frame.ORANGE
local DarkGreen = playergui:WaitForChild("LEDLightsGui").Frame.DARKGREEN
local Pink = playergui:WaitForChild("LEDLightsGui").Frame.PINK
local OrangeishRed = playergui:WaitForChild("LEDLightsGui").Frame.ORANGISHRED
local Cyan = playergui:WaitForChild("LEDLightsGui").Frame.CYAN
local Yellow = playergui:WaitForChild("LEDLightsGui").Frame.YELLOW

Red.MouseButton1Click:Connect(function()
	LedLight.BrickColor = BrickColor.new("Really red")
	LedLight.Material = "Neon"
end)
Green.MouseButton1Click:Connect(function()
	LedLight.BrickColor = BrickColor.new("Bright green")
	LedLight.Material = "Neon"
end)
Blue.MouseButton1Click:Connect(function()
	LedLight.BrickColor = BrickColor.new("Dark blue")
	LedLight.Material = "Neon"
end)
Orange.MouseButton1Click:Connect(function()
	LedLight.BrickColor = BrickColor.new("Neon orange")
	LedLight.Material = "Neon"
end)
DarkGreen.MouseButton1Click:Connect(function()
	LedLight.BrickColor = BrickColor.new("Dark green")
	LedLight.Material = "Neon"
end)
Pink.MouseButton1Click:Connect(function()
	LedLight.BrickColor = BrickColor.new("Pink")
	LedLight.Material = "Neon"
end)
OrangeishRed.MouseButton1Click:Connect(function()
	LedLight.BrickColor = BrickColor.new("Persimmon")
	LedLight.Material = "Neon"
end)
Cyan.MouseButton1Click:Connect(function()
	LedLight.BrickColor = BrickColor.new("Cyan")
	LedLight.Material = "Neon"
end)
Yellow.MouseButton1Click:Connect(function()
	LedLight.BrickColor = BrickColor.new("Bright yellow")
	LedLight.Material = "Neon"
end)




Off.MouseButton1Click:Connect(function()
	LedLight.Transparency = 1
	game.Workspace.LedLight2.Transparency = 0
end)
On.MouseButton1Click:Connect(function()
	LedLight.Transparency = 0
	game.Workspace.LedLight2.Transparency = 1
end)

Which line does the output point to?

Edit: To change materials you should be using Enum.Material. So in your case you’d set each part’s material to Enum.Material.Neon

2 Likes

Its not pointing to anything, also yeah i should do that but how do i fix the fact that it works for material but NOT brickcolor

I figured it out! It was a error in a DIFFERENT script haha