Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to get author that created a script?

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 ;)

2 comments

0

dude the author is the owner of the game are u sped?

0

Maybe you should read the question before you rage.

1 answer

✓ Accepted answer

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.

1 comment

0

Thanks so much, I think im going to drop the change and just use who created the script.

This discussion is preserved as it was. New answers, comments, and votes are closed.