Hello!
Basically title. I’ve tried sending a table with the tween info in it, however it’s quite inefficient.
Hello!
Basically title. I’ve tried sending a table with the tween info in it, however it’s quite inefficient.
Yeah, you can do that.
You can also send the arguments and then construct the TweenInfo with the arguments.
So if I do
local TS = game:GetService('TweenService'):Create(instance, tweeninfo, properties)
and send that via RemoteEvent to the client, that would work?
That’s sending the entire tween, not just the TweenInfo.
I wouldn’t recommend doing that. If you have to send everything to the client then I’d do something like:
local TInfo = TweenInfo.new(1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
RemoteEvent:FireClient(Player, Instance, TInfo, Properties)
RemoteEvent.OnClientEvent:Connect(function(Instance, TInfo, Properties)
local Tween = TweenService:Create(Instance, TInfo, Properties)
Tween:Play()
end)
note that this is really exploitable so I would like watch that out if you’re doing it from server
Yeah, I wouldn’t recommend doing this either way, but if it must be done then you could do it like this.
I would 100% not recommend doing this the other way around and telling the server what/where to tween.
Oh no, I wanted to do it from the server to the client so there isn’t any lag.
How would this be exploitable when you are sending something to the client?!