Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how do I check If a player is moving?

Asked by 2 years ago

I actually have no idea

2 answers

Log in to vote
0
Answered by 2 years ago
Edited 2 years ago
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.Character:Wait()
local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")

local Velocity = HumanoidRootPart.Velocity.Magnitude

while wait(0.01) do
if Player.Character.HumanoidRootPart.Velocity.Magnitude >= 16 then
        -- Do stuff here
        end
end

Create a LocalScript in StarterCharacterScripts and insert this there.

Hope this helps!

0
thank you therealjimmybob 22 — 2y
0
No problem! BirthWormSaiiy 48 — 2y
Ad
Log in to vote
0
Answered by
SuperPuiu 497 Moderation Voter
2 years ago

With a simple search, you could find this: https://devforum.roblox.com/t/check-if-the-player-is-moving/535382

Answer this question