Detect user of Plugin

Hello! I want to know if there is any way for a plugin to know the user that is using it in the plugin script. I tried looking for a way to do this but I can’t find it! Is there any way to do this? Thanks!

2 Likes

This kinda counts as spam


You can use LocalPlayer or GetUserID from StudioService. Although LocalPlayer won’t probably work, maybe in team create.

LocalPlayer works in teamcreate

https://gyazo.com/b488fed75f67dd39294141166fd622fb

Thanks, I can’t believe it got replies already!

And I made another topic because nobody replied to the other one and I made it about 23 hours ago.

Use StudioService:GetUserId, to get the name use Players:GetNameFromUserIdAsync too.

local StudioService = game:GetService('StudioService')
local Players = game:GetService('Players')

local userId = StudioService:GetUserId()
local name = Players:GetNameFromUserIdAsync(userId)

print(name, userId)