Raycasting, while more optimized than previous methods, will put a heavy load on your processing power, especially if you’re firing it that many times a second. I reccomend finding a solution that reduces it to maybe 10 times a second at most, rather than your 12,000.
I should mention that I like messing around finding limits and boundaries of things and this is also an extreme case for what I’m using this code for, I would be doing all of that with ~800 actions or less per second when I replace the BindToRenderStep with a While Loop and remove 13 additional CFrame*Vector3s
Although your response solves my High Script Activity problem and is logical it doesn’t answer my questions of why it’s so important to keep Script Activity below 3%
Keeping your script activity low is important because it leaves more processing power for everything else, such as physics calculations and basic core functions such as the chat module. If your script activity is high, you’ll see these things start to slow down quite a bit.
So to sum it up, low script activity is better so we dont use up all the system resources on one script.
I see, I thought there was more to the story because I did not expected the 100% to be shared with other things, I assumed that Scripts would have there own pool of processing power.
I see, I have done some testing and I would assume that Script Activity has an impact on FPS.
Interestingly since my Script Activity was 7% I got about ~56 FPS or lost 7% of 60 which is 4
Observing further and I found out that with 90% Script Activity I lost 54 FPS and such, although Physics Calculations do have an impact too so this isn’t 100% accurate but is useful information.
% Really should be calculated by what’s available to use taking the backend like physics into consideration for resources. So we understand what % we can go to or use and have 0 impact.