I was trying to make a script for the part to fade out after a player clicks it; then I made a simple debounce using 'clickDet.MaxActivationDistance' so players can't click the part before it actually turns fully transparent...
local part = script.Parent.Parent
local clickDet = script.Parent
clickDet.MouseClick:Connect(function()
if part.Transparency == 0 then
for i = 0, 1, 0.01 do
part.Transparency = i --Cool transparency effect
clickDet.MaxActivationDistance = 0
if part.Transparency == 0.99 then
part.Transparency = 1 and clickDet.MaxActivationDistance = 32 --Error here.
end
wait()
end
else
part.Transparency = 0
end
end)
The error seems to be "Expected identifier when parsing expression, got '=' ". Why does it even show up here?

2 comments
I suggest removing the 'and' and put clickDet.MaxActivationDistance on a seperate line. Use and or not only for if statements or variables (using only or.)
Thanks, my bad. I'll continue on improving my skills...