Hello, I tried to make a method function for workspace to make a part in and put in "()" its name. What is wrong? It asks me in line 6 for an object literally for no reason I can think of.
** Workspace.Script:6: bad argument #3 to 'Workspace' (Object expected, got table)**
game.Workspace = { MakePart = function(n) local a = Instance.new("Part", game.Workspace) a.Name = n end } game.Workspace:MakePart("Explantation, anyone?")
Try this:
function MakePart(n) local a = Instance.new("Part", workspace) a.Name = n end MakePart("This Should Work!")