Why isn't Velocity working

So I came back from a long break from development, trying to use Velocity on HumanoidRootPart, but for some reason it doesn’t work.

game.Players.PlayerAdded:Connect(function(player)
	print("Player joined")
	wait(10)
	player.Character:WaitForChild("HumanoidRootPart").Velocity = Vector3.new(20,20,20)
	print("Done")
end)

What’s the problem here? I know Velocity is deprecated but the fact that it works on normal Part is weird. I would appreciate if anybody helps on this. Thanks :slight_smile:

I’m sure it’s because Velocity started to break as it is deprecated, Just use AssemblyLinearVelocity instead and see if it’s still the same, or use this updated code without any breaking whatsoever

local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(player)
	print("Player joined")
	local char = player.Character or player.CharacterAdded:Wait()
	local root = char:WaitForChild("HumanoidRootPart")
	task.wait(10)
	root.AssemblyLinearVelocity = Vector3.one * 20
	print("Done")
end)
1 Like

Alright, I hope this would work and update you soon. Thanks :slight_smile:

Welp, I increased the value of each axis and it worked. Looks like 20 studs was a small amount for seeing it working.

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