I could make a script that could find out when the idle animation plays, but It doesn't work. There is a way to see if there is an idle player but It checks for players that have been idle for 2 min. How could you change it to 5 seconds instead of 2 min?
1 | game.Players.Player.Idled:connect( function (time) |
2 | print ( "Player has been idle for " .. time .. " seconds" ) |
3 | end ) |
Yes there is a way, I don't feel like scripting it but make a mouse move script that resets a counter the counter goes up every seconds and after a certain amount it goes to idle mode. This value aka the seconds idled should be reset by keydown and moved all mouse functions. So relatively easy.
Example
01 | local player = game.Players.LocalPlayer |
02 | repeat wait() until player.Character |
03 | local mouse = player:GetMouse() |
04 | local seconds = script.Parent.Parent.Seconds |
05 | function moved() |
06 | seconds.Value = 0 |
07 | end |
08 |
09 | function down() |
10 | seconds.Value = 0 |
11 | end |
12 |
13 | mouse.KeyDown:connect(down) |
14 | mouse.Moved:connect(moved) |
Inside the seconds there should be
1 | while true do |
2 | wait() |
3 | if seconds.Value< 60 then |
4 | seconds.Value = seconds.Value+ 1 |
5 | wait( 1 ) |
6 | end |
7 |
8 | end |
Sadly no, if you look at the Roblox Wiki page for this event, then you'll see that the only duration is every two minutes. Sorry about that.
Locked by JesseSong, Void_Frost, and youtubemasterWOW
This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.
Why was this question closed?