How to make a barrier that we can get in

So, I am making a game about a cinema. I want to make a barrier that we can go in with a ticket, and can not if we don’t have it. Help me, please.

Wire a Vending Machine with the item of your choice to a barrier.

(Vending Machine) Item Purchased —> (Barrier) Deactivate Barrier

Welcome to the community!

welcome th the community @the_creator!

do that

you could also use a zone with a checker that checks if you have the right item amount when you enter the zone, and if you do the barrier opens up