So basically this onRunning function is meant to run everytime the player starts running. Which works fine when he’s alone. But as soon as another part touches the character. It’s like onRunning.Humanoid:connect(onRunning) function now starts looping every chance it can. Any idea why this is?
function onRunning(speed)
if speed > 0.75 then
print("running")
stopAllAnimations()
local scale = 16.0
playAnimation("walk", 0.2, Humanoid)
setAnimationSpeed(speed / scale)
pose = "Running"
else
print("standing")
--if emoteNames[currentAnim] == nil and not currentlyPlayingEmote then
stopAllAnimations()
playAnimation("idle", 0.2, Humanoid)
pose = "Standing"
--end
end
end
Humanoid.Running:connect(onRunning)
local debounce1 = false
local debounce2 = false
function onRunning(speed)
if speed > 0.75 then
if debounce1 then
return
end
debounce1 = true
print("running")
stopAllAnimations()
local scale = 16.0
playAnimation("walk", 0.2, Humanoid)
setAnimationSpeed(speed / scale)
pose = "Running"
task.wait(1)
debounce1 = false
else
if debounce2 then
return
end
debounce2 = true
print("standing")
--if emoteNames[currentAnim] == nil and not currentlyPlayingEmote then
stopAllAnimations()
playAnimation("idle", 0.2, Humanoid)
pose = "Standing"
task.wait(1)
debounce2 = false
end
end
Humanoid.Running:connect(onRunning)
Add a debounce, its purpose is to prevent a function from executing too frequently.
More info:
Try to make a debounce to make it only fires once and switch back in one-time.
local Debounce = false
function onRunning(speed)
if speed > 0.75 then
if not Debounce then
Debounce = true
print("running")
stopAllAnimations()
local scale = 16.0
playAnimation("walk", 0.2, Humanoid)
setAnimationSpeed(speed / scale)
pose = "Running"
end
else
if Debounce == true then
Debounce = false
print("standing")
--if emoteNames[currentAnim] == nil and not currentlyPlayingEmote then
stopAllAnimations()
playAnimation("idle", 0.2, Humanoid)
pose = "Standing"
--end
end
end
end
Humanoid.Running:connect(onRunning)
Nah it’s really bugging.
Well, I tried to do some cheese cause I’m too lazy to replicate this animation.
I basically welded the R15? (Not sure if that’s the name of the avatar style) but I basically welded a R15 characters parts onto the Rethro (Again not sure of these names xD) avatar.
And if I remove the parts that are welded onto the Rethro then the animations run smoothly and I don’t get this infinite running of onRunning
.
So I guess it’s some issue with parts being welded? Any idea how to fix this, or is my best solution just to make my own animations?
Is there anywhere else that I can download animations? Cause I couldn’t find anything.
So I found the source of the issue.
If I delete the 2nd humanoid (2nd Humanoid is used to display Shirts/Pants textures over the parts)
Like I’m basically welding a 2nd Humanoid overtop of this Rthro avatar because I want to use the animation but keep the look of the OG R15. Also I can use shirts/pants on it. So this would make for easy clothing changes since there is a ton of R15 clothing out there.
It turns out that the 2nd Humanoid causes the issues.
https://gyazo.com/1e26ac35091153e11d4624306c8fc63a
If I delete the 2nd Humanoid it solves the issues. Is there a way to disable the 2nd Humanoid physics? I guess, or whatever is causes this. But still keep the texture’s applied to the parts?
It’s not about replacing parts. It’s that I can’t use shirts and pants graphics without a R15 or R6 not sure which it is. Humanoid.
That’s why I’m basically welding a character over top of the new Rethro style character. Because I want that animation but I also want to be able to easily find clothing for the zombie models I’m making.