What exactly is BaseScript?

Hello everyone, this is my first post on the dev forums, I hope I’m doing it right. Anyway, my issue is that when I was looking at an open source game, it had somewhere along the lines of

local script = game.ServerScriptService.Script

if script:IsA("BaseScript") then
   --do stuff
end

So I looked at the roblox wiki and saw that “A BaseScript is a base class for all script objects which run automatically”. At first, I thought it was when a script is disabled or not, but when I tested the script:IsA(“BaseScript”) on a disabled script, it still seemed to pass through the if statement.

So my question is: What exactly is BaseScript?

I guess like this? BaseScript

Clearly, it’s any script that is CoreScript, Script or LocalScript. Unlike ModuleScript, which does not execute instantly upon runtime.
image

2 Likes

Ohh, so it’s basically any type of script that is not a module script?

1 Like

The tree in the image isn’t obvious, is it? Yes, that’s right.

1 Like

Sorry for replying to an old post put this caught my attention, why is LocalScript lower on the tree then a normal script?

I believe that is the case of similar operations, only that the LocalScript has differences in how it works compared to the normal script.

1 Like

Where does this tree come from?

here

On the left hand side under “Class Tree”
image

1 Like

Oh okay, thank you. I found it.