roblox how to add a part via a script code example

Example 1: roblox studio how to insert a part in workspace

Instance.new("Part",game.Workspace)--Like this, Instance is telling the game to think about making a part,and .new is saying you have to do it, part is part, and the game is the game, but workspace is the area you work in, therefore, where the part can be placed.

Example 2: How to create a part with script in roblox srudio

local BuildPart = Instance.new("Part",game.Workspace) --Directory of The Part
BuildPart.Size = Vector3.new(50,50,50) 	              --The Size of the Part
BuildPart.Position = Vector3.new(-37, -0.5, -90)      --The Position of The Part
BuildPart.Anchored = true                             --Anchores The Part

Tags:

Misc Example