I got this script from the wiki but it takes 2 minutes for the function to run, How could you make the time change to 5 seconds or so?
game.Players.Player.Idled:connect(function(time)
print("Player has been idle for " .. time .. " seconds")
end)

2 comments
That isn't going to work if the character walkspeed is always 16.
Oh woops I believe there is a way to tell when the player is and isn't walking though