Cant adjust animtrack speed

Im trying to adjust the animtrack speed in this loop and it isnt quite working as intended and erroring

for idx,enemy in pairs(EnemF:GetChildren()) do
		if (enemy.PrimaryPart.Position - hurmp.Position).Magnitude <= 8 then
			local enemyhum = enemy:WaitForChild("Humanoid")
			local tracks = enemyhum:GetPlayingAnimationTracks()
		for i,v in pairs(tracks) do
			if table.find(EnemyAttacks, v.Name) then
				tracks:AdjustSpeed(2)
			end
		end
	end
end
1 Like

(post deleted by author) α…Ÿ α…Ÿ α…Ÿ

No I havent tried that let me try that and get back to you quickly

Alright I just tried that and it didnt work, this is also on a server script and its outputting what it outputted before, any other ideas?

(post deleted by author) α…Ÿ α…Ÿ α…Ÿ

Here is a screenshot of the error

image

(post deleted by author) α…Ÿ α…Ÿ α…Ÿ

Alright got it
Full screenshot of the error in the output :
image
Full screenshot of the function

(post deleted by author) α…Ÿ α…Ÿ α…Ÿ

yeah thats where the function is being called, but I dont think thats the problem though

That’s not the issue, the function call is likely pointing to line 34 where the error occurs. The output window just lets you know that it was that function call that proc’d the error.

I’m not sure which line is 34, but if it is the one with hurmp.Position it’s likely that whatever hurmp is, it isn’t loaded yet or doesn’t exist.

(post deleted by author) α…Ÿ α…Ÿ α…Ÿ

1 Like

Here is the whole script, sorry.

remote.OnServerEvent:Connect(function(plr, combat)
	local char = plr.Character
	local hurmp = char:WaitForChild("HumanoidRootPart")
	-- Functions
	local function SS()
		for idx,enemy in pairs(EnemF:GetChildren()) do
			if (enemy.PrimaryPart.Position - hurmp.Position).Magnitude <= 8 then
				local enemyhum = enemy:WaitForChild("Humanoid")
				local tracks = enemyhum:GetPlayingAnimationTracks()
				for i,v in ipairs(tracks) do
					if table.find(EnemyAttacks, v.Name) then
						tracks:AdjustSpeed(2)
					end
				end
			end
		end
	end
	if combat then
		print("Binded!")
		SpiderLoop = runs.Heartbeat:Connect(function()
			SS()
		end)
	else
		print("Unbinded!")
		SpiderLoop:Disconnect()
	end
end)

(post deleted by author) α…Ÿ α…Ÿ α…Ÿ

1 Like

Wait let me try this out and see if it works,

EDIT: Wow ive literally been having this problem all day man thank you so much for the help

1 Like