Quoteory
(Quoteory)
November 11, 2019, 12:59pm
#1
I’ve noticed some tools (roblox classic sword etc) don’t use a localscript and handle everything with a script including animations
not using a localscript would definitely be easier as you don’t have to use any remotes, is it bad practice to do this?
Classic Sword: ClassicSword.rbxm (8.1 KB)
1 Like
I’m pretty sure if you play an animation on a LocalScript it gets replicated to everybody else so I don’t see why you’d be doing it on the server.
Quoteory
(Quoteory)
November 11, 2019, 1:41pm
#3
because I would have to use remote events to start attacks
local tool activation > local play animation > fire server > start attack
compared to
tool activation > play animation > start attack
it just removes a step, but I’m not sure if it will have performance issues or not
astra_wr
(astra)
November 11, 2019, 2:04pm
#4
You are typically encouraged to entrust the running of animations to the client. This is because they have network ownership over their character, so animations can reasonably replicate as they operate on Motor6Ds in the character and performance is relatively smooth. There isn’t any inherent harm in running an animation on the server. I’d say this kind of scenario is purely preferential or what seems to work better for your case.
As an animator personally, I’ve always handled animations locally because it works better in my case, I rarely come across scenarios where I did have to do it via the server; just like as you said, it’d just make your job easier and skip one step. It’s entirely up to you.
1 Like