I'm trying to do a test for later usage, it is about toggles. This is what I plan to do: When I click on a brick, it toggles between two different colors.
Here it is:
Trigger = script.Parent:WaitForChild('Switch').Trigger
Toggle = false
Trigger.MouseButton1Click:connect(function()
if Toggle == false then
Trigger.BrickColor = BrickColor.Red()
Toggle = true
else
Trigger.BrickColor = BrickColor.Green()
Toggle = false
end
end)
It seems not to work... I have tried a lot of versions, which none of them worked, could anyone help me find the real, the functioning one, please ?

5 comments
You're only fixing one issue with his script, which is BrickColor.new(), the other issue is because he isn't checking if Toggle is equal to true.
I didn't even notice it before !
@supersmartnoobguy Can you mark this as the answer? It took some time to write, besides, it's the correct one!
I could, but it didn't work
You should not really be asking for him to mark it as the answer.