Platformstand animation not pausing with AdjustSpeed(0)

I’m trying to pause all animations on the animator but the platformstand animation plays anyway, I have no idea how I can fix this but it’s probably really simple.

here’s the code

Client Side:

hum:WaitForChild("FreezeEvent").OnClientEvent:Connect(function(freeze)
	if freeze == true then
		for _,anim in pairs(hum:WaitForChild("Animator"):GetPlayingAnimationTracks()) do
			anim:AdjustSpeed(0)
		end
	else
		for _,anim in pairs(hum:WaitForChild("Animator"):GetPlayingAnimationTracks()) do
			anim:Stop()
		end
	end
end)

Server Side:

if ice == true then
			local icestarttime = tick()
			local iceactive = true
			local iceeffect = game.ServerStorage.Spawnables.Game.IceHighlight:Clone()
			iceeffect.Parent = victim.Parent
			victim.PlatformStand = true
			local limbfolder = Instance.new("Folder")
			limbfolder.Name = (victim.Parent.Name.."IceParts")
			limbfolder.Parent = workspace
			for _,limb in pairs(victim.Parent:GetChildren()) do
				if limb:IsA("BasePart") then
					local limbclone = Instance.new("Part")
					limbclone.Transparency = 1
					limbclone.Size = limb.Size
					limbclone.CFrame = limb.CFrame
					limbclone.Parent = limbfolder
					local weld = Instance.new("Weld")
					weld.Part0 = limbclone
					weld.Part1 = limb
					weld.Parent = limbclone
				end
			end
			if victim:FindFirstChild("FreezeEvent") then
				victim.FreezeEvent:FireClient(game.Players:GetPlayerFromCharacter(victim.Parent), true)
			end
			game:GetService("RunService").Heartbeat:Connect(function()
				local iceelapsed = tick() - icestarttime
				if iceactive == true then
					if iceelapsed >= icetime then
						iceactive = false
						iceeffect:Destroy()
						limbfolder:Destroy()
						if victim:FindFirstChild("FreezeEvent") then
							victim.FreezeEvent:FireClient(game.Players:GetPlayerFromCharacter(victim.Parent), false)
						end
						victim.PlatformStand = false
					end
				end
			end)
		end

(I put the animation pausing on the client side while trying to fix the issue, it didnt work. obviously.)

Have you tried printing out the animations from

	for _,anim in pairs(hum:WaitForChild("Animator"):GetPlayingAnimationTracks()) do
			anim:AdjustSpeed(0)
		end

to make sure that the animations are actually present?

I did do this actually, I just removed it cause it didnt make a difference, should I add it back? and if I should should I print it after or before the adjustspeed function.

for _,anim in pairs(hum:GetPlayingAnimationTracks()) do
    print(anim) -- this just checks if we have an actual animation object
	anim:AdjustSpeed(0)
end

still not working right, I’ll experiment for a bit and keep the print in. if you could try and find a solution that would help me out a ton, thanks!

Try adjusting the speed to something other then 0 and see if that works, you may want to try setting AdjustSpeed(2) and see if that makes a difference.

still doesn’t make a difference. I tried it on the server side and the client side.

Yep, so in that case it seems like AdjustSpeed just isn’t working at all, you might want to try replaying the animation and then try freezing it.

this isn’t working either, I have no clue what to do at this point.

I’m gonna try freezing it on both sides and see if that works, dumb idea but it’s worth a shot lol.

That’s weird I just tested it in my game, from the server

for i,v in pairs(game.Workspace.lolbiIlyyy.Humanoid:GetPlayingAnimationTracks()) do 
v:AdjustSpeed(0) 
end

and it froze all of the animations currently playing. Are you trying to freeze the core animations of the character?

it could be that I’m activating platformstand, but I don’t know how I would fix that if it was the case.

I fixed it by using a ragdoll module instead of platformstand.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.