Is this a proper way to wait a client tween?
Asked by
5 years ago Edited 5 years ago
I made a tween to animate a bomb expanding.
After the tween(that lasts 1 second), the bomb explodes.
Part of the Server Script Code:
1 | local player = game. players.SOMEPLAYER |
2 | local bomb = script.Parent |
3 | game.ReplicatedStorage.TweenBomb:FireAllClients(bomb) |
Local Script Code(For a smoother animation):
1 | local tweenservice = game:GetService( "TweenService" ) |
2 | function tweenBomb(bomb) |
3 | local tweeninfo = TweenInfo.new( 1 ,Enum.EasingType.Linear) |
6 | local newTween = TweenService:Create(bomb,tweeninfo,goal) |
9 | game.ReplicatedStorage.TweenBomb.OnServerInvoke:Connect(tweenBomb) |
What I would like to know is if there is some problem that could happen with this method, like a notable lack of sincrony or the bomb taking longer to explode. If there is way that could fix such issue, I would like to know too.