Hello! I’m looking for a specific magnitude of a player when walking
at 15 or higher Walk speed. Does anyone know?
if hum.MoveDirection.Magnitude > 0 then
end
Hello! I’m looking for a specific magnitude of a player when walking
at 15 or higher Walk speed. Does anyone know?
if hum.MoveDirection.Magnitude > 0 then
end
by that what do you mean? are you trying to get its speed?
for speed do this
local speed = HumanoidRootPart.Velocity.Magnitude
Yes, I am trying to make a camera bobble during High Speeds
local speed = HumanoidRootPart.Velocity.Magnitude
if speed > 16 --[[16 is average speed]] then
-- do stuf
end
Alright, I will try this one
char limit
Would this work, or for only running?
char.Humanoid.Running:connect(function(speed)
running = speed > 18
end)
game:GetService("RunService").RenderStepped:connect(function()
local dt = tick()-lastTick
if running then
t = t+dt
local look = cam.CoordinateFrame.lookVector
cam.CoordinateFrame = CFrame.new(cam.CoordinateFrame.p, cam.CoordinateFrame.p+look) * CFrame.Angles(0, 0, math.rad(math.cos(t*11)))
end
lastTick = tick()
end)
that works for everything if your in a car, falling down, jumps, walk, run and many more!
It would probably be better to use game.StarterPlayer.CharacterWalkSpeed
instead of some hard coded value so you could change the default player walkspeed in the future without needing to worry about this script.