of     1   

Dyphonic
#167943372Saturday, July 18, 2015 5:04 AM GMT

I've been trying to figure out how to make a script that bobs the camera if the player walks or runs, but I just can't seem to find the perfect solution. Can anybody help me out here please?
TimeTicks
#167943443Saturday, July 18, 2015 5:04 AM GMT

http://wiki.roblox.com/index.php?title=Camera_manipulation "Talk is cheap. Show me the code." - Linus Torvalds
Dyphonic
#167943713Saturday, July 18, 2015 5:08 AM GMT

I know what camera manipulation is, I've tried many solutions using camera manipulation, they either don't work or they don't move smoothly. My question is what are some functions of Camera manipulation that are useful to create a bobbing script.
JimmyChance
#167948964Saturday, July 18, 2015 6:21 AM GMT

I just tested this online, I hope it works for you so that you can debunk it. local Camera = workspace.CurrentCamera local Player = game.Players.LocalPlayer local Character = Player.Character or Player.CharacterAdded:wait() local Humanoid = Character:WaitForChild("Humanoid") local Shaking = false local Increment = 10 local Delta = 0.1 Humanoid.Running:connect(function(Speed) if Shaking and Speed > 0 then return end if Speed > 0 then Shaking = true local v = 0 game:GetService("RunService"):BindToRenderStep("ShakeCamera", 1, function() v = v + Increment Camera.CoordinateFrame = Camera.CoordinateFrame * CFrame.fromAxisAngle( Vector3.new(1, 0, 0), math.rad(Delta * math.sin(Increment * tick())) ) end) else Shaking = false game:GetService("RunService"):UnbindFromRenderStep("ShakeCamera") end end)
PhilCrow
#228298909Friday, December 01, 2017 7:34 PM GMT

This one works, thanks!

    of     1