I’ve tried to put some animation tracks in a table and then transfer it to the client using RemoteFunction but can’t really seem to get the tracks back because they just return nil
Animation tracks have always been bothering me for a long time
I’ve tried to put some animation tracks in a table and then transfer it to the client using RemoteFunction but can’t really seem to get the tracks back because they just return nil
Animation tracks have always been bothering me for a long time
That’s happening because the tracks don’t replicate. The client doesn’t have a copy of the track, so it is replaced with nil.
I don’t know why you would want to do this sort of thing. Why not just have the LocalScript create and manage the tracks?
I’m trying to make a game system where the client does all the visuals and the server only handles values
Have the LocalScript create the tracks then. Don’t create them on the server if the client also manages the character’s animations. Maybe run the appropriate data through a RemoteEvent or something?
I can’t help you much. You need to describe your problem further. Can you give an example on what you’re trying to accomplish by doing this?
You see, I have zero knowledge of how good and smooth FPS games like Arsenal, Bad Business create their game system. Everything you see on the screen is run by localscripts, and that’s what I want to achieve here, but still struggle to figure out how to.
Hope that gives you the image here
You probably need to relay the underlying data, which would trigger an animation, to the client, instead of the animation track. For example, you could have the server send the name of the animation it wants played instead of a track.
Again, this is pretty general. Could you give a specific case where you are trying to implement your desired system? For example, an animated cat?
I assume that you have thinking about character animations all the time, but my game also uses gun animations, the guns are rigged and the AnimationTracks of the guns are played through an AnimationController.
So I’d like to ask where would I put those Animation instances (not AnimationTracks), because the client will play their gun animations, but will also play other people’s gun animations, that’s where it gets complex
ReplicatedStorage is a viable spot for your animations.
The LocalScript of each player can play animations on themselves, and everybody should see it. If that fails, you can try building a replicator system where each player’s LocalScript tells the server the name of the animation being played, and then the server tells all the other players that animation is being played on this player, and then those players play the animation on their end.
A while after making this post, I’ve also done the same replicator system like you’ve suggested, but still haven’t gotten other players’ animations to play yet. I guess this has turned into a value storing problems.
This is my first time trying to use tables instead of value objects to store values, and I haven’t gotten used to it at all. Could you suggest me a good way to build a value storing system?
Just pass the values through RemoteEvents. No need to store them in tables.
If you store your animations in a folder, you can get the correct animation by passing an animation name to FindFirstChild.
Many people actually don’t recommend using actual objects to store data Using actual objects VS Module scripts to store data