Hello! I am typically a builder so I have no idea what to do here, the head bob looks really wierd as it doesnt look attached to the head, I want to know if there is a way I can make it look more attached to the body but still shaking.
It already bobbles, and it would look fine if I had not made it so you can see arms legs and the torso, the torso goes up and the head does not so it ends up looking really wierd.
for childIndex, child in pairs(character:GetChildren()) do
if child:IsA(“BasePart”) and child.Name ~= “Head” then
child:GetPropertyChangedSignal("LocalTransparencyModifier"):Connect(function()
child.LocalTransparencyModifier = child.Transparency
end)
child.LocalTransparencyModifier = child.Transparency
end
end
camera:GetPropertyChangedSignal(“CameraSubject”):Connect(function()
if camera.CameraSubject:IsA(“VehicleSeat”) then
camera.CameraSubject = humanoid
end
end)
local RunService = game:GetService("RunService")
local playerModel = script.Parent
local humanoid = playerModel:WaitForChild("Humanoid")
local function updateBobbleEffect()
local now = tick()
if humanoid.MoveDirection.Magnitude > 0 then -- Are we walking?
local velocity = humanoid.RootPart.Velocity
local bobble_X = math.cos(now * 9) / 5
local bobble_Y = math.abs(math.sin(now * 12)) / 5
local bobble = Vector3.new(bobble_X,bobble_Y,0) * math.min(1, velocity.Magnitude / humanoid.WalkSpeed)
humanoid.CameraOffset = humanoid.CameraOffset:lerp(bobble,.25)
else
-- Scale down the CameraOffset so that it shifts back to its regular position.
humanoid.CameraOffset = humanoid.CameraOffset * 0.75
end
end
-- Update the effect on every single frame.
RunService.RenderStepped:Connect(updateBobbleEffect)
You can mess around with the settings as you wish, it will look realistic at some point.
Developer Wiki source, by the way.
Instead of writing 30, just heart the replies as a sign that you’ve read it. “30” can get you moderated, so I wouldn’t risk it. Just some feedback