I am not too into profiling, but I believe it might be a good thing to keep track of nevertheless.
.6391544 START
.6392865 END
This is the amount of time between the start and end of :quickplay().
if run_service:IsClient() then
script.events.call_tween.OnClientEvent:Connect(function(instance, tween_info: {any}, properties)
if not instance or not tween_info or not properties then
return
end
local tween_info = TweenInfo.new(tween_info.time, tween_info.easingstyle, tween_info.easingdirection, tween_info.repeatcount, tween_info.reverses, tween_info.delaytime)
module.quickplay(instance, tween_info, properties)
end)
end
function module.quickplay(instance: Instance, tween_info: TweenInfo, properties: {}): Tween
if run_service:IsClient() then
local tween = tween_service:Create(instance, tween_info, properties)
tween:Play()
else
script.events.call_tween:FireAllClients(instance, {time = tween_info.Time, easingstyle = tween_info.EasingStyle, easingdirection = tween_info.EasingDirection, reverses = tween_info.Reverses, delaytime = tween_info.DelayTime, repeatcount = tween_info.RepeatCount}, properties)
end
end
Is that an okay time for this code? This is assuming the remote event is not being called and is just being turned into a tween. By that, i mean this profiling is done with the function being run on pure clientside.
Also if anyone is wondering why I don’t just develop a tween in this scenario, I plan on adding more features and customizability to my module in the future, so it’s best for consistancy.