Reference this for such a thing:
there will be a conflict with other BetterAnimate settings
Which settings?
Im not sure but hes the OP so trust what he says
This module has a considerable amount of errors
Ones that I encountered:
- default settings 151, Trove isn’t defined correctly! It’s not easy for me to fix it with the other variables such as “Trove_Tool” and “Trove_Animation”
- Better animate fix center: “nil” (supposedly primarypart) doesn’t have custom properties…? I am using a skinned mesh rig but it happens even without it.
- After attempting to fix both, there’s still more errors with PrimaryPart in other functions
- For some reason, there is no primarypart issues in studio once fixing the Trove issue.
Workspace settings that I think may need to be addressed:
- Streaming is enabled (on legacy)
- signalbehavior is deferred
Am I using this module incorrectly?
local new = module.New(character, {
Enabled_Inverse = true,
})
new:Start()
Hello, thanks for a report.
-
default settings 151
I forgot to change
task.defer(self.Trove.Destroy, self.Trove, true)
to
task.defer(self.Trove_BetterAnimate.Destroy, self.Trove_BetterAnimate, true)
-
Better animate fix center
Are you sure your model (character) have PrimaryPart?
-
Streaming is enabled
I’ll do support for this as soon as I have some free time!
For the primarypart in character, I do have it set correctly. I’m not sure exactly why it doesn’t say that the primarypart is “nil” in studio, but it does say it is “nil” in the player. The only thing i could think that might be causing it is the streamingenabled?
hello, i have found the cause of the primarypart issue. it was an external module loading animations onto a client not resetting when the character is forcibly reloaded, along with not resetting many other things. sorry for the bother
could you implement marker reached connection? this module feels scuffed.
This works well and I will use it, however I encountered a problem, when I die, it doesn’t play the animations and I get this in the output:
BetterAnimate.DefaultSettings:150: attempt to index nil with 'Destroy'
DefaultSettings Line 150:
task.defer(self.Trove.Destroy, self.Trove, true)
Just put this on your animate script
Humanoid.Died:Connect(function()
MyAnimator:Destroy()
end)
Just curious, how much more efficient is this animate script when it comes to having lots of humanoids? Has anyone tested this, and how much of a difference does this script make?
How can i make so that the animation updates to the default and removes an animation?
Wow, this module is really helpful! But
I have a slight issue.
When you switch an animation is does not play until after a few seconds.
This also happens when you turn your character
Example code:
self.MyAnimator = self.BetterAnimate.New(self.Character, {
Enabled_Inverse = true,
Time_DefaultAnimationTransition = 0.1,
Enabled_ClimbFix = true,
Class_SpeedAdjust = {
Walk = 9,
Run = 14,
Sprint = 24,
Climb = 6,
Swim = 10,
},
}) :: BetterTypes.BetterAnimate
self.CharacterWalkingPresets = {
Sprint = { Run = { { ID = AnimationLib["player"]["type"]["movement"]["SPRINTING"] } }, Walk = { { ID = AnimationLib["player"]["type"]["movement"]["SPRINTING"] } } },
Walk = { Run = { { ID = AnimationLib["player"]["type"]["movement"]["WALKING"] } }, Walk = { { ID = AnimationLib["player"]["type"]["movement"]["WALKING"] } } --, Idle = { { ID = AnimationLib["player"]["type"]["movement"]["IDLE"]]
}
-- Crouch = { Run = { { ID = "113962040067794" } }, Walk = { { ID = "113962040067794" } }, Idle = { { ID = "123183127826986" } } },
-- CrouchIdle = { Idle = { { ID = "123183127826986" } } },
}
self.Humanoid.Changed:Connect(function()
self:UpdateState()
end)
function AnimateStateController:UpdateState()
local MyAnimator = self.MyAnimator
local WalkSpeed = MyAnimator.Humanoid.WalkSpeed
if WalkSpeed <= 12 then
MyAnimator.Settings.Time_DefaultAnimationTransition = 0.1
MyAnimator.Settings.Class_SpeedAdjust = {
Walk = 9,
Run = 12,
Sprint = 24,
Climb = 6,
Swim = 10,
}
if MyAnimator.Humanoid.Health > 0 then
MyAnimator:UpdateAnimations(self.CharacterWalkingPresets.Walk, true)
end
elseif WalkSpeed >= 16 then
MyAnimator.Settings.Time_DefaultAnimationTransition = 0.1
MyAnimator.Settings.Class_SpeedAdjust = {
Walk = 9,
Run = 21,
Sprint = 24,
Climb = 6,
Swim = 10,
}
if MyAnimator.Humanoid.Health > 0 then
MyAnimator:UpdateAnimations(self.CharacterWalkingPresets.Sprint, true)
end
--[[elseif self.Signaling_Attributes.Crouching.Value then
MyAnimator.Settings.Time_DefaultAnimationTransition = 0.3
MyAnimator:UpdateAnimations(self.CharacterWalkingPresets.Crouch, true)]]
end
end
The code above is in a animationStateController OOP Module.
Regardless this is an awesome module, It really helped me saved time on the movement animations.
Hi I have looked deeper into the animation state player and when I went into debugging there were more than 20 other Core Animations playing over it
How it should be(not moving):
How it is (moving):
Hi, thanks for using my module. I haven’t worked with it for almost 5 months, I’m not really sure what’s causing this problem. I’m planning to rewrite it soon to update the logic and add more features (it probably won’t look like the old versions).
Oh ok thanks. Thanks for your help. Can’t wait for the new update!
Update 1.3 is OUT!
Whats' new? [CLICK ME]
In short: almost everything
“_” means method or value is private (not recommended to set or use manually)
Added
Unlim Bindable (Module)
One of BetterAnimate's helpers.
Alternative to BindableEvent, BindableFunction.
Made by me.
FastConfig
Table with values that can be changes manually at any time safely
:SetEventEnabled()
Disable/Enable event fire event
:SetClassTimer()
A timer showing how much time should pass before the animation of the same class changes.
:SetClassEmotable()
Set class that allow to emote.
Example:
Idle: ✅
Walk: ❌
:SetClassAnimationSpeedAdjust()
local MovingSpeed = 20
local Adjust = AnimationSpeedAdjust[`Run`] --> 16
local AnimationSpeed = MovingSpeed / Adjist
:SetInverseDirection()
Specifies when :GetInverse() should return -1 animation speed multilpier .
:SetClassInverse()
Specifies which class support inverse.
:SetRunningStateRange()
local SpeedRange = NumberRange.new(
0.4,
9
--[[
-math.huge - 0.4 == Idle
0.4 - 9 == Walk
9 - math.huge == Run
]]
),
:SetStateFunction()
Use only if you know what you are doing.
Specifies State logic that handles Class(es)
:PlayEmote()
Play emote, sets Class to “Emote”
:StopEmote()
Stop emote (if playing)
:Step()
Main function that running all logic
Removed
:Start()
:StopPlayingAnimations()
:UpdateAnimations()
:AnimationUpdater()
:GetHeightScale()
:FallDelta()
- Hi
:ToolAnimationEnded()
:ChildRemoved()
:ChildAdded()
GetAvatarAnimationsByUserID()
Changed
Signal_NewState, Signal_NewAnimation, Signal_NewDirection, Signal_KeyframeReached
Events now located in table
local BetterAnimate = require(ModuleScript_BetterAnimate).New(Character)
local Events = BetterAnimate.Events
FixCenter()
FixCenter() renamed to: FixCenterOfMass()
Removed from build in function, now you can call it on require()
local FixCenterOfMass = require(ModuleScript_BetterAnimate).FixCenterOfMass
:PlayAnimation()
:PlayAnimation() renamed to: :PlayClassAnimation()
:StopCurrentAnimation()
:StopCurrentAnimation() renamed to: :StopClassAnimation()
:Direction()
:Direction() renamed to: GetMoveDirectionName()
Removed from build in function, now you can call it on require()
local GetMoveDirectionName = require(ModuleScript_BetterAnimate).GetMoveDirectionName
:SwitchAnimation()
:SwitchAnimation() renamed to: :_SetAnimation()
:RollAnimation()
:RollAnimation() renamed to: :GetRandomClassAnimation()
:ForceState()
:ForceState() renamed to: :SetForcedState()
:EnableDebug()
:EnableDebug() renamed to: :SetDebugEnabled()
:AnimationEvent()
:AnimationEvent() renamed to: :_AnimationEvent()
& And much more
🟩Devforum post update is live🟩
Wow! Nice work this will really help with my animation class system!
Update 1.3.0.1
Added:
Fixes:
So… Can you add support for animation events/markers? Would be REALLY helpful, thanks.