For some reason the console keeps printing the string after I leave the collision box. Can anybody help me?
I think it looks like it continues to print because your logic is simply looking to see if the Overlapping Restrictor variable is valid and not null.
So, what I gather from the logic you have here, on Begin Overlap it casts and sets a reference to the box via the Overlapping Restrictor variable. Then the tick will see that variable is valid and will print “HasRestrictor,” which will continue indefinitely. Then on End Overlap it again casts to the player and sets the Overlapping Restrictor variable again to the box. Therefore, the tick will continue to see that Overlapping Restrictor variable as valid, despite the player leaving the box.
You need to make the Overlapping Restrictor variable null in the End Overlap, otherwise it will keep printing that it is valid. You do that by not setting anything to the variable (you have “Self” being set to it).
You are amazing thank you
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.