I’ve got this tween that runs when a Player has died, However there is visual delay on the Tween for the rest of the Server (Not all the time) but its not ideal.
Not sure how id go about fixing such an issue as I’m pretty new to scripting and tweening in general.
Thanks,
function deatheffect(player,hit)
local tweenservice = game:GetService(“TweenService”)
local char = hit.Parent
local humanoidRoot = char:FindFirstChild(“HumanoidRootPart”)
local travel = humanoidRoot.Position + Vector3.new(0,20,0)
local char = hit.Parent
I’ve recently started to move a lot of my Tweens to be client side only for things like special effects that don’t affect gameplay.
You could make that above a local script and get it to activate by firing a remote event to all clients.
TweenService eats up a lot of the server’s resources. Especially when you take into account that the server also has to replicate changes to every player at the same time while tweening. Always, always, always, when possible, use RemoteEvents to have the clients do all the tweening. Especially with physics.
It’s much faster to tell nine children to clean up their own mess, than to clean up each of their messes on your own.