LINDON55
(Lindon)
November 28, 2020, 10:54am
#1
I’ve been trying to make a thing where your character gets cloned locally and does a animation, but it just would stand still
What I tried doing was putting in a animation and a localscript that would play the animation in the character.
(the code for the localscript)
local anim = script.Parent.Humanoid:LoadAnimation(script.Parent.Animation)
anim:Play()
Any help would be appreciated.
dthecoolest
(dthecoolest)
November 28, 2020, 11:10am
#2
Hmm, for your current code did you make sure to publish the animation? I believe you can only load an animation if you have published it to Roblox and own it or your group does.
Anyways here is a thread regarding a locally cloned animation, I believe you will need to make sure to create your own animator object and such:
O, nevermind, I’ll try this solution (it works now)
Like, in the top of a local Animate script: (messy but just focus on the animator destroy/instance.new)
local lp = game.Players.LocalPlayer
while not lp.Character or not lp.Character.Parent do wait() print'waiting for char' end
local Character = lp.Character --script.Parent
local Humanoid = Character:WaitForChild("Humanoid")
local oldanimator = Humanoid:WaitForChild'Animator'
oldanimator:Destroy()
local newanimator = Instance.new('Animator',…
Otherwise, if you don’t want to publish the animations perhaps you can use @Chrythm animation system in order to manually read the keyframe sequence data of an animation.
Animation System
This was made specifically for this kit due to the lack of support for animation sharing on Roblox. With that being said, the way that animations are played in this kit are by reading KeyframeSequences. It’s not perfect, but it’s a much better alternative. All animations are played on the client, so any animation on an enemy will need to fire the client event for animating. To add an animation, simply save an animation in the animation editor plugin and copy it from the “AnimSaves” model inside of your rig. Put it inside of the ReplicatedStorage.Animations and you’re all set! Control the animations that weapons and enemies use with their respective values.
1 Like