It could be you or maybe check some plugins you have installed. Anything external could also be the problem.
Test your tween in a fresh place, you probably wont experiment any lag. Should be the others systems in your place, which are very demanding maybe, so the tween wont work fine
Here, you can test this one.
TweenTest.rbxl (21.4 KB)
I only use f3x for building, and also here is the clip. at the end you can see my script: https://streamable.com/055d8b
im not sure what would be so demanding in mine, i dont have any running scripts in the background
So no scripts at all? Just a tween script?
I have had filtering enabled issues with this place in the past before so maybe thatās the problem? What I mean by that is I re-enabled fe multiple times and it didnt seem to actually activate though published many times over
Here are my suggestions & opinions after reading your scripts:
- Donāt let the server tell the client to tween. Every visual effects SHOULD be handle on the client, no matter the case.
- Although may not help, I suspect it is your specs. If this is ran in Studio, it will create a local server which YOU hosted it, so the serverās performance will depend on the specs of your computer.
I just tested this with some friends, they had the same lag spike even if they hosted the server
Is this the only script you have in game? (Excluding the CoreGui and CoreScripts)
Can you send the whole script?
If you want, you can also send the game place file for better inspection.
If you kept the Script like it is
Then you are debouncing after asking the client to play the tween. On your client event in the LocalScript, do a quick print(āfiredā) and you will most likely see it print out many times over.
This has happened to me more than one time, these were the causes:
-
I was sending a remote event in touched, the tween was moving the block and sending tons of remotes.
-
I had connected to render step a function and it did a lot of code and sent a lot of actions but only when the block was moving, so tweening obviously started causing a lot of lag.
-
I was accidentally creating a lots of tweens and playing them at the same time
-
One or two more times it happened but I donāt remember the causes.
Hope I helped! Good luck!
Forgive me but its an entire cc game so no thats not the only script.
weird, it didnāt do it multiple times. Also I get the same result for tweening on the client and server. Here you can see thereās something wrong https://streamable.com/055d8b
If it didnāt do it multiple times then my only concern is that you are massively eating up the thread scheduler, yielding somewhere in your code that is causing all of these issues in the first place.
Did you test a tween on an empty baseplate yet as @Dev_Peashie mentioned?
yeah it runs smoothly in a baseplate
What about checking your console, script activity charts? And see what scripts in ur game are very consuming? maybe trying to disable those systems for the tween test, until you find the one that is causing this behaviour, then u optimize that one.
Along with the above post, could you let us see the ClientEvent in your LocalScript
event:FireClient(Player)
Definitely wonāt be able to assist further without some more info.
im gonna optimize my scripts rn. I know my sound regions arent the best and their very power consuming since I was using remote events. Looping transparency is a simple solution for me, and lerping cframe properties thanks to @tarneks . I think its my scripts running in the background that are likely causing this. thank you everyone for helping >_<
BUT roblox maybe should look into this further if anyone else has the same issue nevertheless.