Why is my script not working

hello there, is the script wrong or something?

local platform = script.Parent
local isTouched = false
local function byebye()
if not isTouched then
isTouched = true
end
for count = 1,10 do
platform.Brickcolor = BrickColor.new(“Earth green”) == count / 10
wait(1)
end
platform.CanCollide = true
wait(1)
isTouched = true
platform.Touched:Connect(byebye())
end

goodbye have a nice day :wink:

2 things,

The touched event is in the function itself, it should be outside

You’re firing the function, not setting it to the event, remove the ()