I'm not great with scripting but I'm wondering how I can continuously grab the speed of a player. This does not refer to walk speed but just the speed/magnitude of a player. For example, constantly grabbing the speed of a player throughout a roller coaster ride or a bus ride. The point of this is to convert that to a player's local field of view, to create a dramatic speed effect.
while true do wait() local player = game.Players.PlayerAdded:Connect() player.Humanoid.HumanoidRootPart = game.Workspace.Camera.FieldOfView end
I know that if this were to work the field of view would be weird, but I'm looking for a starting point (I'll add different values later to make it work properly)
Try checking the players velocity maybe?
There is an event of the Humanoid called Running. It basically fires every time the player's velocity changes and has a parameter with how many studs per second they are moving.
Humanoid.Running:Connect(function(Speed) -- ok end)
As CowboySprite said, you'd need to check their Velocity. Below will get the job done:
print(game.Players.LocalPlayer.Character.Head.Velocity.Magnitude)