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

Why does Instance.new() use a period and not a colon?

I looked at the Instance class on the API reference and it mentioned that Instance.new() was a function. If it is a function, how come it uses a period instead of a colon?

1 answer

✓ Accepted answer

Instance.new() uses a period because that’s how Roblox programmed it to be. It’s a type of built in function made also by roblox to insert objects automatically while the game is running. It doesn’t use a colon because it’s the type of built in function that performs differently than others. Take this for an example

local newPart = Instance.new(“Part”, game.Workspace)

local destroyNewPart = newPart:Destroy()

Instance.new() is an independent function while other built in functions rely on an Instance. hope this helps and I hope you understand!

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