generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: How do I detect if a humanoid is in motion?

Previous Thread :: Next Thread 
theMetasponge64 is not online. theMetasponge64
Joined: 12 Feb 2010
Total Posts: 18284
20 Dec 2013 11:02 PM
The title says all




Guns don't kill people, people kill guns.
Report Abuse
theMetasponge64 is not online. theMetasponge64
Joined: 12 Feb 2010
Total Posts: 18284
20 Dec 2013 11:02 PM
I should reword this more.

I mean as in moving via the keys (WASD, Arrow Keys)




Guns don't kill people, people kill guns.
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
20 Dec 2013 11:04 PM
local mouse = game.Players.LocalPlayer:GetMouse()
mouse.KeyDown:connect(function(key)
if (key:lower() == 'a' or key:lower() == 's' or key:lower() == 'd' or key:lower() == 'w') and game.Players.LocalPlayer.Character.Torso.Velocity.magnitude>1 then
--code
end
end)
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
20 Dec 2013 11:07 PM
Or just check if math.floor(torso.Velocity) > 0
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
20 Dec 2013 11:08 PM
torso.Velocity.Magnitude*
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
20 Dec 2013 11:09 PM
^I thought about that, but then he said "as in moving with asdw", so not like when you're falling or have a random flying hax moment...
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
20 Dec 2013 11:10 PM
or just moving in any direction
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image