so I have several NPCs in the camera object so they are local to the player however since scripts do not work in the camera (As far as i’m currently aware) im wondering how I can apply my standard roblox animation script to the npc, any ideas?
You don’t need to put them into the camera if you have Filtering Enabled set to true, because any changes the client makes isn’t replicated to the server. You can just add them into the workspace (wherever you want) using a Localscript!
*facepalms soooooo hard at forgetfulness *
actually the animate script still not working however knowing that it doesnt need to be in camera helps, any ideas?
Make sure the body parts are unanchored except for the humanoid Root Part. Aside from that make sure the npcs has a humanoid object (or animation controller if you’re using a custom health script depending how it determines it)
Humanoidrootpart has to be anchored?
As far as I’m aware of it’s automatically anchored when playing or animating. Just give it a try. Aside from that check if the rig is rigged properly and if the animation is played with a script in the NPC. It might be created locally but local scripts don’t work in workspace
the script isnt running point blank, thats the problem lol
Huh? That’s really odd. Care to just put the NPC in workspace serverside. See if it responds to that. Aside from that where is the script located?
so the NPC is cloned from replicated storage to workspace via local script then the animate script is inside the NPC
You need to use CFrame to animate parts,because they dont have physics
for a identical server-sided NPC it works tho?
An npc containts a humanoid. It’s possible. @anon92559147 i just need to know if the script resonds if it’s not created locally. And what kind of script is in the npc? Is the animation script a local script or just a script
Default roblox animation script duplicated in both formats rn
for server sided NPCs I only use server animate tho
Animating on npcs work differently. You need to manually activate the animation on movement or idle. The standard animation script respond to input of a keyboard(often) (which won’t respond at all as local scripts don’t work outside the localplayer his character. Id suggest rewriting the script or looking at some npc free models. (Using them for learning resources isn’t a shame. Education in any form is key)
I think since its a local part I should be able to just have a animation script in player scripts that fires when npc is inserted into workspace , however this issue was mainly for working out a way to have a simple animation script contain idealy in relation to the NPC itself