So i ben workin’ on dis lil gun shop, but da dude be like, having to pull da gun out his backpack, so like how i make that jut for da client?
Do the animation in a local script.
bro, that doesnt make it only on client lol.
I dunno then. I figured that if you run the animation on an NPC from the player who is buying the gun it would only work for them. Maybe mess with network ownership and see what that yields?
Well I got it to work, don’t know how.
I’m not sure if it’s ironic or not but talking that way makes the thread more difficult to understand and it doesn’t help that the thread itself is vague in its points so it’d be helpful to correct the way the thread is worded and explain your case more.
That being said I think I generally grasp the idea. If you’re trying to manage an NPC’s animations, you can indeed play the animation from a LocalScript but you’ll have to disable animation replication first. Ultimately this does mean that the client will need to be responsible for any future animations though.
To disable animation replication, pick one of the following depending on your case:
- In case of an existing Animator, destroy the Animator and instance one from the client.
- In case of a nonexisting Animator, instance one from the client.
As simple as having a LocalScript run the animation after that.
That don’t think that isn’t true. I think I remember reading something that players character animations are replicated automatically. If you call the animation from a local script on a character which isn’t the players I am sure you will be able to make animations only for client.
I apologize, I was going for a sort of joking talk, but it was a serious question, this is inside a local script inside of a StarterGui, that gets cloned from a NPC’s uppertorso and put into the players gui, it works only on the client, so I guess I learned a little
local RunAnimation1 = Instance.new('Animation') RunAnimation1.AnimationId = 'rbxassetid://0' local RAnimation1 = GunBackpack.Humanoid:LoadAnimation(RunAnimation1) RAnimation1:Play()