i’m trying to add camera sway, but i don’t really know how to do that
all i have as of right now is this:
local plr = game:GetService("Players").LocalPlayer
local Char = plr.Character or plr.CharacterAdded:Wait()
local RootPart = Char:WaitForChild("HumanoidRootPart")
local Humanoid = Char:WaitForChild("Humanoid") -- i don't think i'll need this
local Camera = workspace:WaitForChild("Camera")
if RootPart.AssemblyLinearVelocity.Magnitude > 1 then
end
no? its a statement checking if humanoid.MoveDirection.Magnitude is over 0, if so it sets the variable to 1 else it sets it to 0
Humanoid.MoveDirection is a Unit vector and it updates faster which is good for our situation
Are you talking about the Camera Z Axis (Roll) swaying to the direction the Player is turning, or making the camera Bobble (Sway) when the Player is walking?