How to Arms bob

How to Make Character’s arms bob?

I want to make Arms bobbing.
But it moves weird.

(15) sussy Roblox Studio 2023 06 24 10 53 21 - YouTube

local spring = require(game.ReplicatedStorage.SpringModule)
local bobbing = spring.new()
local char = game.Players.LocalPlayer.Character
local function Bobbing(addition)
	return math.sin(tick() * addition * 1.3) * 0.5 -- Increase the multiplication to make it faster!
end

game:GetService("RunService").RenderStepped:Connect(function(dt)
	local bob = Vector3.new(Bobbing(10),Bobbing(5),Bobbing(5))
	bobbing:shove(bob / 10 * (char.HumanoidRootPart.Velocity.Magnitude / 10))
	local updatebob = bobbing:update(dt)
	char.HumanoidRootPart.CFrame  = char.HumanoidRootPart.CFrame:ToWorldSpace(CFrame.new(updatebob.Y, updatebob.X, 0))
end)

Here is script

I tried to move Left Shoulder and Right Shoulder but it didnt worked

Please help me

:frowning:

4 Likes

I finished it myself

Here is code :

local spring = require(game.ReplicatedStorage.SpringModule)
local bobbing = spring.new()
local char = game.Players.LocalPlayer.Character

local function BobbingOMG(addition)
	return math.sin(tick() * addition * 1.3) * 0.05 
end

game:GetService("RunService").RenderStepped:Connect(function(dt)
	local bob = Vector3.new(BobbingOMG(10), BobbingOMG(5), BobbingOMG(5))
	bobbing:shove(bob / 10 * (char.HumanoidRootPart.Velocity.Magnitude / 10))
	local updatebob = bobbing:update(dt)


	char.Torso["Left Shoulder"].C0 = char.Torso["Left Shoulder"].C0 * CFrame.new(0, updatebob.X, -updatebob.Y)
	char.Torso["Right Shoulder"].C0 = char.Torso["Right Shoulder"].C0 * CFrame.new(0, updatebob.X, updatebob.Y)
end)

1 Like

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