Help With my Theme park game Placing Entry and Exit

Some headache I trying to come Around here For the theme park game

…The Problem I having now is I can still delete the fence even when I place the next ride ofcourse.

This function should only be active for the Ride I just Placed


Need to find Another system for this