You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I am trying to make the transition between the animation and the actual throwing to be smooth, so it would be seamless -
What is the issue? Include screenshots / videos if possible!
the issue is that there is sometimes a slight pause (usually like a half a second)
i want to get rid of this pause, so its indistinguishable of the throwing when about to throw and being thrown -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I’ve tried to make the throwable gun on the client, because client can handle the physics more accurately. the script is on the server
one of the solutions i’ve thought about was making the animations play on the client and do the work on the server, however i am not sure how to intertwine server and client together
here is the code on the server
local hideMag
hideMag = self.Animations.Reload:GetMarkerReachedSignal("HideMag"):Connect(function()
hideMag:Disconnect()
showhideEvent:FireAllClients({self.model["Deagle"]["Mag"]}, 1)
physicsEvent:FireAllClients("Mag",self.model["LeftHand"]["MagSpawn"].WorldCFrame, (self.model["LeftHand"]["ThrowDirection"].WorldPosition - self.model["LeftHand"]["MagSpawn"].WorldPosition).Unit, throwMag)
end)
the animation plays on the server
this code hides the gun from on the client
and throws the gun on the client