Let's say, somebody enters a script and the script's name is changed, how do I get the script's original name?
COMMUNITY QUESTION
How do I get a script's original name?
1 answer
Let's just say the script changes when a part is touched so do this to keep track of the name
local scriptName = "script name here"
script.Parent.Touched:Connect(function()
script.Name = "heyy"
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
have a variable that keeps track of the scripts initial name
what do you mean by that?
at the beginning of the script have a variable that contains the scripts original name. either can do name = "YourNameHere" or name = script.Parent.Name