thats why im asking you to add support that is built into warp only. tween → table | table → tween
How does warp compare to Bytenet? Is there a benchmark for it? I see Warp being a bit easier to work with.
no and you can just do it ur self sending table and convert to tween after received.
but it doesnt work anymore after switching over from 1.0.12 to 1.0.13
Events.Event2:Connect(function(player, message)
print("Script2:Event2", player, message)
print(TweenInfo.new(table.unpack(message)))
end)
it does?? :\
in my case when i switched over to the newer version it looked as if the client stopped receiving the remote and didnt tween anything
Server/Client:
export type TweenArray = {
Time: number,
EasingStyle: Enum.EasingStyle,
EasingDirection: Enum.EasingDirection,
RepeatCount: number,
Reverses: boolean,
DelayTime: number,
}
local function tweenToArray(tween: TweenInfo): TweenArray
local array: TweenArray = {
Time = tween.Time,
EasingStyle = tween.EasingStyle,
EasingDirection = tween.EasingDirection,
RepeatCount = tween.RepeatCount,
Reverses = tween.Reverses,
DelayTime = tween.DelayTime
}
return array
end
if RunService:IsServer() and not TweenNet then
TweenNet = Warp.Server("TweenNet")
end
function Helpers:Tween(instance: Instance, tweenInfo: TweenInfo, propertyTable: {[string]: any}, waitAsync: boolean?, callback: () -> ()?, ...): ()
local callbackParams = {...}
if RunService:IsClient() then
local tween = TweenService:Create(instance, tweenInfo, propertyTable)
tween.Parent = instance
tween:Play()
if not waitAsync then
tween.Completed:Connect(function()
tween:Destroy()
if callback then
callback(table.unpack(callbackParams))
end
end)
else
tween.Completed:Wait()
tween:Destroy()
if callback then
callback(table.unpack(callbackParams))
end
end
else
local tweenInfoArray = tweenToArray(tweenInfo)
TweenNet:Fires(true, instance, tweenInfoArray, propertyTable, waitAsync, callback)
end
end
Server → Client replication:
local TweenNet = Warp.Client("TweenNet")
export type TweenArray = {
Time: number,
EasingStyle: Enum.EasingStyle,
EasingDirection: Enum.EasingDirection,
RepeatCount: number,
Reverses: boolean,
DelayTime: number,
}
local function arrayToTween(array: TweenArray): TweenInfo
return TweenInfo.new(
array.Time,
Enum.EasingStyle[array.EasingStyle.Name],
Enum.EasingDirection[array.EasingDirection.Name],
array.RepeatCount,
array.Reverses,
array.DelayTime
)
end
TweenNet:Connect(function(instance: Instance, tweenInfoArray: TweenArray, propertyTable: {[string]: any}, waitAsync: boolean?, callback: () -> ()?)
local tweenInfo = arrayToTween(tweenInfoArray)
local tween = TweenService:Create(instance, tweenInfo, propertyTable)
tween.Parent = instance
tween:Play()
if not waitAsync then
tween.Completed:Connect(function()
tween:Destroy()
if callback then
callback()
end
end)
else
tween.Completed:Wait()
tween:Destroy()
if callback then
callback()
end
end
end)
Works in 1.0.12, doesn’t work in 1.0.13.
Also could you add support for passing over functions? Pretty please!
…u good? roblox dont even allow u to pass a function’s through remote event / bindableevent natively… :
dont ask a stupid/random questions, thanks…
then how could i pass functions through in v1.0.12…
Also could you tell me if something is wrong with my replication? It broke in v1.0.13.
again… roblox doesnt allow u to send a function with remote event / remote function / bindable event…
Can you assist me with whats wrong with my replication? It still doesn’t work even after removing the callback.
just check the arguments that you send to client was correct.
The arguments are indeed correct. The animation never plays or is parented to the instance.
Edit: It plays after switching back to v1.0.12
i didnt face any issue with sending table & instance… (client → server → client)…
sandbox_Warp.rbxl (73.3 KB)
Could i provide you with a debug place in this case?
@Eternity_Devs Here is the debug place:
WarpDebug.rbxl (88.4 KB)
When you change the Warp Variable to:
local Warp = require(Packages.OldWarp)
from:
local Warp = require(Packages.Warp)
the replication will work properly.
i figured why, so its the instance sent from the server, when the buffer convert back to instance from buffer format it doesnt save full path (.parent).
Is it my fault or is it the modules fault?
just the buffer serialization doesnt have support to store the path location of the instance.