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)
Maybe try getting it when they're walk speed hits 0 then keep adding time to a variable called idleTime. Maybe try this:
idleTime = 0 character = game.Players.Player.Character character.Humanoid.WalkSpeed.Changed:connect(function () if character.Humanoid.WalkSpeed == 0 then while character.Humanoid.WalkSpeed == 0 do wait(1) idleTime = idleTime + 1 print("Player has been idle for "..idleTime.." seconds") end end end)