Discord Webhook Record Time In-Game (Help Needed)

Hello scripters! I am trying to create a system that will record a player’s time in-game as logs. This is needed to check activity for groups that have activity requirements or want to see how active their staff members are.

I am looking to create a script that will send a message to a discord channel through webhooks saying something along the lines of player was in game for time in min minutes. But whilst doing that, I want to be able to make the webhook only track people above a certain rank as lower ranks don’t need to be checked.

Due to my low experience in Lua and programming (I am a modeler/builder), I’m having a hard time writing something functional. I have tried to use tutorials on DevForum for join tracking, but those don’t do the job. I have also gone on youtube and tried finding tutorials there, but they don’t have a rank limit feature and aren’t as proficient.

All help is welcome and thank you! :slight_smile:

Just use datatstores os.time() and player:GetRankInGroup(ID_HERE) then when player leaves you can save it again and send it to Discord

I won’t recommend tick as it could be easily changed on clients pc

EDIT: os.time() is just a alternative