Expected identifier when parsing expression, got 'if'

This seems like it should be really easy to fix but I just don’t get it, I may be having a dumb moment.

This is the script:

if ViewPort.Visible == true then

end

The error is the title of the post.

Is ViewPort a variable and is this the whole script?

I haven’t shown the variables but other than that yes

Are you sure that’s your entire script? This error shouldn’t happen if your script is just those 2 lines. Please show the rest of the script if it exists.

Is there something in the if statement?

image
Turns out I was just having I dumb moment, I forgot that I removed the value of the variable above. sorry for the bother.

No Problem it’s fine all good.