I understand this is confusing, let me explain and what its purpose is. This is my first plugin, it fills out all information in the script I may need. Credits to the author ect. I need to get the author who created the script, and who changed it. Heres a piece of my code.
workspace.ChildAdded:Connect(function(child) if child:IsA("Script") then local script = child local table = os.date("*t") local message = string.format(table.wday) print(message) script.Source = "--[[ {Credits} \n Author: .... \n Date of Creation:" ..string.format(table.month/table.day/table.year)"\n Last Change:..." end end)
What are we doing here? We are detecting when a script is added into the workspace. Im really stumped on how I would get the author of the script, the person that created it. We need to do the same thing when the source is changed. Find out who changed it
Thanks in advance. (My first question ;)
Try using the GetStudioUserId function combined with the GetNameFromUserIdAsnyc function.
GetStudioUserId: https://developer.roblox.com/en-us/api-reference/function/Plugin/GetStudioUserId GetNameFromUserIdAsnyc https://developer.roblox.com/en-us/api-reference/function/Players/GetNameFromUserIdAsync
For finding out who changed it you would have to Change the text in the Client of the Person that changes it. That requires everyone in your Team to have the Plugin.