Animate is not a valid member

  1. **What is the issue?

The problem is I’m getting this error whenever I reset and then touch the part. But, when I first play everything works fine. The ragdoll effect still works even after the error.

I tried adding waitforchild but I encountered another error. Which is infinite yield. I tried researching but couldn’t find similar problem to mine.

When I added waitforchild in line 9.

Setup:

moduleInvoke

local ragdoll = require(script:WaitForChild("RagdollMeModuleScript2"))
local SecondPart = require(script.SecondPartB)

The error is happening in “character.Animate” line 9
ragdoll:

local module = {}

local character = script.Parent.Parent
local humanoid = character.Humanoid

function module.ragdoll()
	local setEnabled = humanoid:GetState() ~= Enum.HumanoidStateType.Physics
	humanoid:ChangeState(setEnabled and Enum.HumanoidStateType.Physics or Enum.HumanoidStateType.GettingUp)
	character.Animate.Disabled = setEnabled

	if setEnabled then
		for _,v in pairs(humanoid:GetPlayingAnimationTracks()) do
			v:Stop(0)
		end
	end
end

return module

secondPart:

local module = {}

local ragdollModule = require(script.Parent:WaitForChild("RagdollMeModuleScript2"))
local billboardGuiPart = workspace.BillboardGuiPart2

local debounce = true

function touched(part)
	if debounce then
		debounce = false
		ragdollModule.ragdoll()
		wait(4)
		ragdollModule.ragdoll()
		debounce = true
	end
end

billboardGuiPart.Touched:Connect(touched)

return module

That means that there isn’t an object named Animate in the character.

There is Animate in the character which is really confusing. I think it has to do with loading. When I reset.
image

it’s probably because Animate is a local script and you can’t see it from the server

nvm i just found out that you can delete the Animate script from the server and it disables the player’s animations from the client AND the server

you got to check if the part that touches the billboardGuiPart is a child of the player’s character (or if it’s the character)

Wait I think I stopped the error.

I deep looked on the ragdoll module and it had this part so I removed it fixed it

I’m currently using this open source ragdoll module R15 / Rthro Ragdolls

nvm you put it in startercharacterscripts, sorry for the confusion

No, it’s fine. I figured it out. I used find all tool and typed “Animate” and it helped me find if any other script were playing with Animate Instance.

1 Like