So my game has a lot of Tweening objects like doors, curtains, levers, etc.
I handle the Tweens on the server, and Im surprised how laggy the Tweens are when handled on the server.
Should I make the Tweens on the client instead?
So for instance:
ServerScript in door model:
local object = workspace.Door.PrimaryPart
local info = {
5,
Enum.EasingStyle.Quad,
Enum.EasingDirection.InOut
}
local goals = {
CFrame = object.CFrame * CFrame.Angles(0,math.rad(80),0)
}
local remote = game.ReplicatedStorage.Events.TweenRemote:FireAllClients(info, goals, object)
wait(info[1])
object.CFrame = goals["CFrame"]
LocalScript:
game.ReplicatedStorage.TweenRemote.OnClientEvent:Connect(function(info, goals, obj)
local newInfo = TweenInfo.new(info[1], info[2], info[3])
local tween = TweenService:Create(obj, newInfo, goals)
tween:Play()
end)
Would this be good to do?
Is there any changes I should make?
Will all clients have synced up Tweens (with low fps or high ping)?
Thanks in advance!