Custom movement walking is too slow

i wanted to make my own movement system so i can make more complex behaviour
but, for some reason, even tho i set the walkspeed to 16 the movement is EXTREMELY slow
i tried get the square root of the walkspeed, but that then made it too fast

heres the snippet that controls the movement:

game:GetService("RunService").Heartbeat:Connect(function(delta)
	script.Parent:SetAttribute("walkDirection", module:getWalkVector())
	
	local walkvec = module:getWalkVector()
	local camOr = workspace.CurrentCamera.CFrame:VectorToWorldSpace(walkvec)
	local Squished = Vector3.new(camOr.X, 0, camOr.Z).Unit
	
	if module:getWalkVector().Magnitude ~= 0 then
		local ALV = hrp.AssemblyLinearVelocity
		hrp.AssemblyLinearVelocity = Vector3.new(Squished.X * script.Parent:GetAttribute("walkspeed"), ALV.Y, Squished.Z * script.Parent:GetAttribute("walkspeed"))
		
		if script.Parent:GetAttribute("FaceVelocity") then
			local upVector = Vector3.new(0, 1, 0)
			local cf = CFrame.lookAt(Vector3.new(), Squished, upVector)
			local x, y, z = cf:ToOrientation()
			
			local crot = hrp.CFrame.Rotation:Lerp(CFrame.Angles(x,y,z), script.Parent:GetAttribute("turnVelocity"))
			
			hrp.CFrame = CFrame.new(hrp.CFrame.Position) * crot
		end
	end
end)
2 Likes

anyone there? still needing help!

I only see rotation in this script… Where is the movement part of the movement

local ALV = hrp.AssemblyLinearVelocity
		hrp.AssemblyLinearVelocity = Vector3.new(Squished.X * script.Parent:GetAttribute("walkspeed"), ALV.Y, Squished.Z * script.Parent:GetAttribute("walkspeed"))
		

hrp.AssemblyLinearVelocity = Vector3.new(Squished.X * script.Parent:GetAttribute("walkspeed"), ALV.Y, Squished.Z * script.Parent:GetAttribute("walkspeed"))

hrp.AssemblyLinearVelocity += Vector3.new(Squished.X * script.Parent:GetAttribute("walkspeed"), ALV.Y, Squished.Z * script.Parent:GetAttribute("walkspeed"))
Try this.

nvm i found a fix, turns out the main reason i was making the custom movement was what messed it up
the humanoid weird friction when on ground, i just deleted the humanoid and it worked, thanks anyways

1 Like

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