Quote:
Originally Posted by FunnyBear
Why would you want to set a timer then open the gate, why not just open the gate under OnPlayerUpdate?
|
He is opening it in OnPlayerUpdate, but he's setting a timer of 4 seconds to close it again it seems.
But you see, if a player is in range of the gate, let's say that player has a FPS of 60.
It will open the gate, AND create a new timer lasting 4 seconds. It will do this 60 times a second.
You quickly see this creating infinitely more and more timers, 60 times a second.
You should use a boolean to check whether the gate is opened or not, to close it again.
Although im not sure this is the problem, if this happens immediately when you start the server, and not when a player is near the gate, it's still a major issue.