|
| 30 Jul 2017 03:38 PM |
There are a lot of buildings in my game, and presently in order to keep track of where the client is in relation to them I've been using loops
I've noticed lag spikes occurring spontaneously in my game, can I tie this to them?
They're structured like this
script.Parent.BindableEvent.Event:Connect(function() local function recursiveThread() --Stuff to check where the client is or something end recursiveThread() end)
And then I have some statements to differentiate one thread from another based on what fired the event
Does having a lot of these cause lag? There's like one per building.
|
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 30 Jul 2017 03:44 PM |
| Magnitude checks are expensive, what exactly are the purposes behind the bindable events and functions? |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2017 03:49 PM |
Cause I figured if excessive use of coroutines and spawn would cause latency that bindableevents would be a work around :P
|
|
|
| Report Abuse |
|
|