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

How Do I know when a player stopped walking?

Asked by 9 years ago

I want to make a script that a player dies after he stopped walking. But I can't find the right Property to find it? Can someone help me??

Here's how my finished script would look like:

--LOCAL SCRIPT

player = game.Players.LocalPlayer
Person = player.Character
DontStop = false

game.Workspace.Triggerpart.Touched:connect(function(hit)
if hit.Parent.Name == player.Name then
Person.Humanoid.Walkspeed = 100
DontStop = true
end

--Help here: When the player stops walking and DontStop == true then...
Person.Humanoid.Health = 0

Your help will greatly be appreciated. If you wish, your username may be posted under the Minor Credits section in my game.

2 answers

Log in to vote
3
Answered by 9 years ago

Read here: http://wiki.roblox.com/index.php?title=API:Class/Humanoid/Running

0
Thanks. Would you like your ROBLOX username to be put in the credits section? fahmisack123 385 — 9y
0
Nah, but if you got any more questions don't be scared to ask me. xImmortalChaos 565 — 9y
Ad
Log in to vote
-1
Answered by 9 years ago

Another thing you could do would be getting when an idle animation plays, they die. Look at the custom animations article on the wiki.

Answer this question