For my project I modified the default animate script to have an interchanging animName table. That way when the player has a weapon equipped, I can give the animate script a table of animations from a separate module it can call to update its own animName table. The code for the most part works fine on the client side, although there’s a few glaring issues that need to be addressed:
Other clients cannot see when a player walks or runs, they can see all other animations (at least idle, jumping, and swim/swimidle.) When players are walking or running, to other clients it looks like they’re gliding along the surface without any animation playing
When clients walk or swim, after a while the walking or swimming animation stops playing and the idle animation plays. I’m using a custom idle animation and the idle animation that plays is the default roblox idle animation, which is nowhere to be found in my animate script. With the swimming, other players can see when the animation turns to idle, with walking its pretty hard to tell but I’m pretty sure that’s also the case.
Code (forgot how to indent code, mb)
print(“u called to configure me!”)
if context.currentSlot.Value and context.currentSlot.Value ~= “empty” then
local animNames = require(weaponAnims[context.currentSlot.Value.."_module"]) --[[for i,v in pairs(script:GetChildren()) do if v:IsA("StringValue") then v:Destroy() end end ]] for name, fileList in pairs(animNames) do configureAnimationSet(name, fileList) end elseif context.currentSlot.Value == "empty" then print("emptying out the values") --[[for i,v in pairs(script:GetChildren()) do if v:IsA("StringValue") then v:Destroy() end end ]] local animNames = require(weaponAnims.humanoid_module) for name, fileList in pairs(animNames) do configureAnimationSet(name, fileList) end end if pose == "Standing" then playAnimation("idle", 0.1, Humanoid) elseif pose == "Running" then playAnimation("walk", 0.2, Humanoid) end
Please help, I thought my interchanging animNames idea was clever n I buckle under pressure (;-; )