#Animations somehow stop after I unequip the tool.
89 messages · Page 1 of 1 (latest)
you use custom settings to setup the animation of gun walking which probably breaks the original animation script
@mighty cove
ur anims conflict
and the way you play them
ok
I actually stop them.
Like you see,when I unequip the gun
I actually stop all playing walkanims
I actually tried it,and yet that happens,as I showed here
Ok lemme see
also i noticed your character only cast a shadoww after equipping and unequipping a gun
my bad
do you load like a custom character or anything
Oh
No,I doN't
That's normal roblox rig
ok lemme check this
I'm sending the rest
This is supposed to be Animation Handler
Like change Animate's Animations
like make changes on them
anyways
your code needs some work
I know right,It's so messed up
and your use of the typechecker is redundant
Yeah
Hold on sending Module Script's equip and unequip functions
you dont need to run type(Track) because the function expects a string
It has possibility to be a table too
That's why I was using type
Anyways function is wrong in any way
Just look at the parts where It has "Animations_On" boolean as True
others are not included with it
Remote.Event_024.OnClientEvent:Connect(function(Animator : Animator,Track : string | {},NecessaryAnimTable : {}?)
local AnimTracks = Animator:GetPlayingAnimationTracks()
if type(Track) == "string" then
for _,AnimTrack : AnimationTrack in AnimTracks do
if AnimTrack.Animation.Name == Track or AnimTrack.Animation.Name:find(Track) or AnimTrack.Animation.AnimationId == Track then
AnimTrack:Stop()
AnimTrack:Destroy()
end
end
elseif type(Track) == "table" then
for _,AnimTrack : AnimationTrack in AnimTracks do
for _,val : string in Track do
if val == "WalkAnim" then
if AnimTrack.Animation.Name == val and NecessaryAnimTable then
AnimTrack.Animation.AnimationId = NecessaryAnimTable[val]
end
elseif val == "Animation1" then
if AnimTrack.Animation.Name == val and NecessaryAnimTable then
AnimTrack.Animation.AnimationId = NecessaryAnimTable[val]
end
elseif val == "Animation2" then
if AnimTrack.Animation.Name == val and NecessaryAnimTable then
AnimTrack.Animation.AnimationId = NecessaryAnimTable[val]
end
else
AnimTrack:Stop()
AnimTrack:Destroy()
end
end
end
else
error("Type invalid!")
end
end)``` is this where you stop all anims?
or here
Remote.Event_023.OnClientEvent:Connect(function(Animator : Animator)
local AnimnTrackList = Animator:GetPlayingAnimationTracks()
for _,AnimTrack : AnimationTrack in AnimnTrackList do
if AnimTrack.Animation.Name:find("Animation") or AnimTrack.Animation.Name:find("Anim") then
AnimTrack:Stop()
AnimTrack:Destroy()
end
end
end)
Hold on I'm writing
Alright so
You see Event_024?
ya
That meant to stop all animations,except WalkAnimation's animationid
to prevent the thing which was happening in the video I have sent
But,It seems It didn'T change anything.
Ahhhh so you directly change the animation under the Animate of the player?
Yeah
if val == "WalkAnim" then
if AnimTrack.Animation.Name == val and NecessaryAnimTable then
AnimTrack.Animation.AnimationId = NecessaryAnimTable[val]
end
This part meant to do it
to prevent it
hm
I'm not really depth on roblox api but yeah.
you dont have to change the whole walk animation, since roblox by default puts one arm up. just run a viewmodel of two arms if need be and have to in holding the gun position instead of changing the animation
just load and unload these "arms" when they equip a gun
idk how t o explain this
you just want 2 or even one arm to replace the characters real arm and hold them in place with constraints. just make the actal arms transparent so scripts dont break. when they de-equip the gun, make the arms transparent/move them back or whatever
Okay,so.
I want to know one more thing
Am I forced to do changes to Animation like stop or change It's animation id through Server Side?
for to make it show up on server
or just the client?
when changing animations i suggest handling it on the server becaues its less restricted and you can also stream to all client
So no need for
@terse marlin So no need for the animation handler which is a local script?
Well if you want the animation to happen on a client based event (like player taking a gun out) you need the client. and be weary since animations on the server will take more memory so use it only if others have to see
I see
@terse marlin
I forgot to mention that Anims do collide on server side when I try the server side option
Weird results like this
Thats because on the client you stop the animations but not on server
Ahhhh
So I stop the animations from client?
But I launch them from server
If that's what you meant