Infinite yield possible on Torso with animation script (R6)

Its keep sending me this error somehow (Infinite yield possible on 'Players.MegaPartyXD.PlayerScripts:WaitForChild(“Torso”)

its in workspace inside model and one part

and here the Animate script

and its send me too error with UGC in my avatar too with the animation

1 Like

The animate script should be placed in StarterCharacterScripts instead of StarterPlayerScripts

2 Likes

I think its work right now thx you!, but its still error for the UGC items

1 Like

Is there an error that you can post?


yea sure

If you would, please post the first script in text form so I can edit it

script.Parent.Transparency = 1
parent = script.Parent

parent.Touched:connect(function(hit)

	if hit:FindFirstChild("NoGrav") == nil then
		local bv = Instance.new("BodyForce", hit.Parent:FindFirstChild("HumanoidRootPart"))
		local h = hit.Parent:findFirstChild("Humanoid")
		hit.Parent.Animate.fall.FallAnim.AnimationId = "rbxassetid://9994619922"
		bv.Name = "NoGrav"
		bv.Force = Vector3.new(0,-9,0)* -workspace.Gravity/150
	end
end)

Try this

script.Parent.Transparency = 1
parent = script.Parent

parent.Touched:connect(function(hit)
	local humanoid = hit.Parent:FindFirstChild("Humanoid")
	if humanoid then
		local character = hit.Parent
		local HumanoidRootPart = character.HumanoidRootPart
		if not HumanoidRootPart:FindFirstChild("NoGrav") then
			local bv = Instance.new("BodyForce")
			bv.Name = "NoGrav"
			bv.Force = Vector3.new(0,-9,0) * -workspace.Gravity/150
			bv.Parent = HumanoidRootPart
			character.Animate.fall.FallAnim.AnimationId = "rbxassetid://9994619922"
		end
	end
end)
1 Like