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

Attemp to call from table value?

while true do
        wait(3)
        local Bricks = Instance.new("Part",game.Workspace)
	Bricks.Anchored = false
	Bricks.Position = Vector3(0,20,0)
end

Im trying to learn Lua and i tried making random parts fall out of the sky but it does not work :C

1 answer

Bricks.Position = Vector3(0,20,0)

In this line (5), you are trying to call Vector3 as a function. This wont work because Vector3 isn't a function/constructor, but rather a data type/table. Therefore, you won't be able to call Vector3 itself.

In other words, to correctly create a Vector3 object, you will need to use the new constructor inside it.

Bricks.Position = Vector3.new(0,20,0)

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