This came up to my mind

So I started to script by the help of an IRL friend yknow, and he told me somethng like this;

a = (Small command goes here)

If I put the command inside of ‘‘a’’ manually, it works but if i just put ‘‘a’’, not at all. Why’s that? You’ve named ‘‘A’’ As that command so if i say ‘‘A’’ is just saying the command itself. So why doesn’t it work?

*I think the command was something like ''Instance.new(more stuff here, i already forgot what did he say LOL)

well instance.new for ex will turn a into that instance, a = instance.new(“Part”) will make a be a part

What do you mean? Are you talking about something like this?’

local New = Instance.new

local Part = New("Part")
Part.Size = Vector3.new(10, 10, 10)
Part.CanCollide = false
Part.Anchored = true

Part.BrickColor = BrickColor.new("Lime green")
Part.Material = Enum.Material.Neon

Part.Parent = workspace

This is valid way to create instances, but IMO you really shouldn’t do it like this.

Well, i really was trying to mean that even if people think that ‘‘scripting language’’ is a simplified english, its apparently not

I get what you’re saying, but why doesn’t a = instance.new(“Part”) work by itself?

Instance.new(“Part”) just adds a part into the DataModel. The extra lines are just setting properties of that part, for example Position or Transparency or Parent.

Instance.new can create most instances (they are just not able to create instances that Roblox locked themselves) like Sound (Instance.new(“Sound”)), etc

1 Like