So i was making some kind of a game where the player will have some units that follow him, so how can i give the owner of these units the ability to play animations for them, like how roblox characters work, the client can play any animation on the client side and it'll replicate to the server side, is that possible?, and if it is, how can it be achieved?
#Giving a player the ability to play animations on a rig that's not his character
1 messages · Page 1 of 1 (latest)
Fortnite jonsey
How are you S1?
I have omega full lights
is this an insult or what cuz i don't get it lol
remote events obviously
you're cooked
You need to play the animations in server script @high scaffold
Itll take alot of performance to do so
I was asking if there is a way to make it like teh player character
Bro i want to do ecerything on the client
Understand the question first
if you want it to play for other players then you need remotes
Understand that you DO NOT have a choice
Then the animations won't Show on other clients
Well this is not required while olaying animations on ur character
If u played an animation
it is required, it's just that Roblox does it internally
No u can do it urseld
** You are now Level 3! **
In a local script u can load a animation and play it and itll repkicate to other players
Yes
that is because that is default behavior
if you want to give them ownership of every npc then you're going to have a TON of exploitation potential
They r unnecessary noc
but suit yourself, it's setnetworkowner and it has to be called on the server
Npcs
you can still blind players
Just a visual thing
Network ownership doesnt let u play animations
that's probably because the server does it internally for your own player
Bro there is an option to turn off other players npcs
huh, almost as though I said that already
If u r not sure please do not talk
I was suspicious of that
everything I am saying is rhetoric
use remotes 🙂
Remotes arent the best thing for performance bro
Sending 1 sentence will take over 15 bytes
And ill be playing different animations
15 bytes r huge
A whole 15 bytes...
Bud in scripting theyre huge
No
There is a whole built in library in luau for compressing data called buffers
Why did they make it in ur opinion
Srry not luau Roblox
I should know, I built a replicator that allows you to register classes for cross-network calls
USING buffers
(sad that it is still converted to json in Roblox though)
Because it is not
Then why not compress it
It is, there will be more than1 noc
Npc
Each one has its own animations playing
Not every frame but itll change frequently
if you want to compress a sentence then you could for example only use 26 of the 256 values in a byte for every character and unpack it however you figure
you can also use certain algorithms for "commonality" of characters
Well the idea of using a remote event itself annoys me, that is why i was looking to do it on the client
not possible sorry
Cuz the npc movement is heing calculated on the client
you do not need to send it for every npc
Bro im on mobile and mobile keyboards r trash
same
if you are trying to select which NPCs perform a specific animation I would recommend (for dynamic count of NPCs) a numeric id based structure along with numeric ranges, coupled with the specific (numeric) identity of the animation for quick dispatch and efficient memory usage
if they all do the same animation simultaneously then you should focus on just the animation identity ofc
Alr
This si not exactly how the system should work but i appreciate ur intention for helping me
The system will play 3 animations really
Idle and running or walking (depends on if the player is running or walking ofc)
So the player might swtich from running to walking super fast, using remote events everytime the plyer switches anims feels wrong
sorry I meant that I agree with you but I forgot to switch my keyboard
😭
as far as the internal networking of animation tracks goes, I do not know if it is possible to detect when it is changed on the server because I have never tried
but it probably can work that way too if you prefer not to use remotes for what would otherwise be inferred
so for every client, check which animation track is playing etc. and play it or whatever your situation is
But I forget if there is actually a way to detect WHICH animation TRACK is being played, because as I recall it doesn't store that anywhere which is just poor API design icl
That was going to be my approach if giving the client the ability to play animations for rig isnt possible
thing is, the server has to have somePlayerInstance.Character = someModel where there can only, obviously, be one model at a time
I think there is a way to detect when an animation gets played on the animator, i remember using it, but idk if i discovered a turnaround or it was an event
that is how it knows to internally handle animation requests
you can also disable that if you hide it in workspace.Camera, but anyways
Disable what exactly?
** You are now Level 4! **
client animation request authorization
because the client would see a different humanoid, not the one on the server, due to the fact that workspace.Camera does NOT replicate any children
I dont get what u mean
Why will i need to prevent the players from playing anims locally
Thank you Lou Bloom from Nightcrawler
no reason at all, unless you decide to make everything remote-based
(which I would prefer)
Nah i wouldnt prefer that
Most games load animations on the client side
And play them there
oh no I meant play the animation locally
but send the request through remote
to play it for other clients and/or the server
Its better if ur game has alot of animations that users can do
Because u can store all the tracks in a mfoule anf access them on the client without hacing to worry about server memory
Yeah ik
Loading the same animation twice will make two different tracks for the same animation, that is why storing tracks in a table or a module is better
mhm
Because of memory and that weird 256 animation tracks cap thingy
still don't know why Roblox thought it was a good idea to make LoadAnimation but no table of animationtracks
average disinformation moment
There is a eay to get the currently playing animation tracks but not the loaded animation tracks
Idk why
ye
Even tho they're probably stored somewhere
Cuz if they're not how does roblox memorize the 256 animations that were loaded and whenu try to load 1 more animation it gives u a warning
Anyway thanks for ur help dude
Really appreciate that's