Script's names are strings?

Straight forward to what I said in the title. For Instance whenever a script is named eg.(142) and you try to return its value, It always decides to return a string value. I don’t really know why and I’d be happy if someone could explain why thats the case.

Here’s some code I’ve wrote that you can test out to see what I mean:

repeat task.wait() until game:IsLoaded()
for i,v in pairs(game:GetService("StarterPlayer"):FindFirstChild("StarterCharacterScripts"):GetChildren()) do
	if v:IsA("LocalScript") then
		spawn(function()
			while true do
				task.wait(4)
				if typeof(v.Name) == "number" or type(v.Name) == "number" then
					return print(typeof(v.Name)) 
					
				elseif typeof(v.Name) ~= "number" and typeof(v.Name) == "string" then
					return print(typeof(v.Name))
				end
			end
		end)
	end
end

It’ll ALWAYS return string for some reason. In either case if u have named the script for instance (13232) or if you’ve named the script (LocalScript)

A string is always a string, even if it only contains numbers. You can use tonumber() if you want to.

It just doesn’t make sence in my head, A string is taught in as being a STRING (“String”) for eg not something like (13343) being a string. I must just have missunderstod it though.

Yeah because it’s a name, imagine if you had to define every time whether the name was an integer a string, etc. That would be awful. Names are strings it makes more sense. Also if someone does want to do what you are trying to do there are built-in functions like tostring(), tonumber() to help you.

Shouldn’t this go to scripting support. You are not allowed to do this here. @Sinkl0z