How to make ball roll smoothly

So I have made it where the player spawns as a ball but it’s not quite how I want it to be.


Here the ball sort of stops rotating when there’s no input and decelerates quickly

The movement here is a lot smoother and continues rolling

I saw an older post about this that uses BodyAngularVelocity but it’s deprecated so I’m using AngularVelocity. ChatGPT is not exactly helpful and there’s not really videos about AngularVelocity in the context of a ball.
I’m confused and I just want my ball to roll smoothly man :sob:

Here’s my script:

runService = game:GetService("RunService")

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(char)
		local HRP = char:WaitForChild("HumanoidRootPart")
		local marble = Instance.new("Part")
		marble.Shape = Enum.PartType.Ball
		marble.Size = Vector3.new(8, 8, 8)
		marble.Parent = char
		marble.BrickColor = BrickColor.new("White")
		marble.Material = Enum.Material.SmoothPlastic
		marble.Name = "Sphere"
		marble.CustomPhysicalProperties = PhysicalProperties.new(10, 0.3, 0.5, 100, 100)
		
		local attachment = Instance.new("Attachment")
		attachment.Parent = marble
		local velocity = Instance.new("AngularVelocity")
		velocity.Parent = marble
		velocity.Attachment0 = attachment
		velocity.MaxTorque = math.huge
		velocity.Name  = "AngularVelocity"
		

		local Hum = char:WaitForChild("Humanoid")
		local Weld = Instance.new("Weld")
		Weld.Parent = marble
		Weld.Part0 = HRP
		Weld.Part1 = marble
		Hum.PlatformStand = true

		
		local decal = Instance.new("Decal")
		decal.Parent = marble
		decal.Texture = "rbxassetid://92427949853173"
		decal.Face = Enum.NormalId.Top
		runService.Heartbeat:Connect(function()
			wait()
			velocity.AngularVelocity = Vector3.new(char.Humanoid.MoveDirection.z * 10, 0, -char.Humanoid.MoveDirection.x * 10)
		end)
	end)
end)
1 Like

Why can’t you just change the floor’s custom property like so:


to get an ice effect? (Where the higher the friction weight, the longer it decelerates)

I messed with the friction property but I didn’t try the FrictionWeight property :neutral_face:. It’s smoother now and it’s how I want it. I’m just curious as to why it stops rotating though.

1 Like

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