Frames Per Second Script
I was originally using this script to change the FPS of the camera but it stopped working after this recent update.
Now there is an error message where it says script. camera.enabled.
Can someone help me fix this so I can change the FPS again??
Thanks.
// @input Component.Camera camera
// @input float framerate = 10
var countdown = 0;
function onUpdate() {
countdown -= getDeltaTime() * script.framerate;
script.camera.enabled = (countdown <= 0);
if (countdown <= 0) {
countdown += 1.0;
}
}
script.createEvent("UpdateEvent").bind(onUpdate);
It looks fine to me
sometimes even with an error your script still works, and it's a common issue every time I make a script that has .enabled it gives me errors but they still work fine.
but if it's not working as before ill try my best to help you.
anyways what's the difference you getting aside from that error issue.
Yeah I will test the lens out and its flickering instead of slowing the fps. If you look up Android FPS 2 that is what the original filter was. I think the new update messed it up somehow.
Yea it did are you good at scripting?
alright so all you have to do is display the frames in text so it'll be able to show up on screen
ill be back in a few hours if you need any help
could you help me with that and be very specific I barely know how to even use python lol.
That’s JavaScript 🤣
haha yeah I just don't know where exactly to put in the number for the FPS specifically in the script and not in the framerate in the inspector. Can you send a screenshot??
So right now I'm just trying to display the fps in a text instead of the camera but I noticed how the script is not displaying fps instead it's blinking per second so I'm trying to display the frames in txt but in numbers
oh ok well thanks for the help even if you cant figure it out!!
sorry I misinterpreted what you meant but I still edited the script it seems as if slowing the frames down doesn't work anymore unless I'm doing something wrong
Lmao by doing so it crashed my Pc Lens studio and my browser
messing with the frames it bugs my Lens Studio.
dang I just wanted to try and fix it because I was getting 100k+ views on tik tok from making dumb android looking videos.
It's just a bug wait till the team responds back they'll probably just comment. or just report a bug
Hi, were you able to find a fix for this issue? I'm having to same problem with my lenses.