Custom Character refuses to change its direction midair

My new custom character refuses to change its direction midair. However, my old character actually does not have this problem. My older character and new one have the same humanoid properties and sizes. I guess the issue not related to the hair accessary since I tested it, so I don’t know why this happens, it would be really nice if someone will navigate me to the source of this issue.

Here’s the script, but I don’t think this problem is related to it too

local runS = game:GetService("RunService")

local anim = script:WaitForChild("Walk")
local idle = script:WaitForChild("Idle")
local jump = script:WaitForChild("Jump")
local fall = script:WaitForChild("Fall")

local character = script.Parent

local hum = character:WaitForChild("Humanoid")
local animTrack = hum.Animator:LoadAnimation(anim)
local animTrack2 = hum.Animator:LoadAnimation(idle)
local animTrack3 = hum.Animator:LoadAnimation(jump)
local animTrack4 = hum.Animator:LoadAnimation(fall)

animTrack2:Play()

local HRP = script.Parent:WaitForChild("HumanoidRootPart")

local interval = .1
local elapsed = 0

runS.Heartbeat:Connect(function(dT)
	elapsed += dT
	if elapsed >= interval then
		elapsed -= interval
		local magY = math.abs(Vector3.new(0, HRP.AssemblyLinearVelocity.Y, 0).Magnitude)
		local magX = math.abs(Vector3.new(HRP.AssemblyLinearVelocity.X, 0, 0).Magnitude)
		local magZ = math.abs(Vector3.new(0, 0, HRP.AssemblyLinearVelocity.Z).Magnitude)
		if magX > 0.3 or magY > 0.3 or magZ > 0.3 then
			if not animTrack.IsPlaying then
				animTrack:Play()
			end
			animTrack2:Stop()
		else
			animTrack2:Play()
			animTrack:Stop()
			animTrack3:Stop()
			print("no")
		end
	end
end)

hum.StateChanged:Connect(function(old, new)
	if new == Enum.HumanoidStateType.Jumping then
		animTrack3:Play()
		animTrack:Stop()
		animTrack2:Stop()
	elseif new == Enum.HumanoidStateType.Landed then
		animTrack3:Stop()
	end
end)
2 Likes

just a guess, is the character massless?

fireboy and watergirl…

2 Likes

I have checked properties of both character’s body parts and their ‘Massless’ value is false, I guess it’s not about this. Yeyeyyeye, this is fireboy and watergirl :smiley:

hmmm, my last guess then

is the scale of watergirl 1? or is it above/below?

if the scale isn’t 1, it causes some weird physics issues

2 Likes

lololol, how didnt I notice it. Thanks a lot for the help, everything does work! Look how huge it is now, but the jumping is fixed
image

1 Like

nonono

you can scale it down to your desired size, then press the arrow next to “Scale”, it’ll set the current scale to 1

1 Like

Lol thanks a lot for telling me about that

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