Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local plr = game.Players.LocalPlayer
- local Humanoid = plr.Character.Humanoid
- local RS = game:GetService("RunService")
- function Update()
- local CT = tick()
- if Humanoid.MoveDirection.Magnitude > 0 then
- local BobX = math.cos(CT * 10) * 1
- local BobY = math.abs(math.sin(CT * 10)) * 1
- local Bob = Vector3.new(BobX, BobY, 0)
- Humanoid.CameraOffset = Humanoid.CameraOffset:Lerp(Bob, .1)
- else
- Humanoid.CameraOffset = Humanoid.CameraOffset * .5
- end
- end
- RS.RenderStepped:Connect(Update)
- -- Put inside of StarterCharacterScripts!
- -- Make sure it's a LocalScript so It Works.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement