I want it to put a script in the block when it is created
local draw = function(target, source, color)
local mag = (source - target).magnitude
local Part = Instance.new("Part")
Part.Anchored = true
Part.CanCollide = false
Part.Locked = true
Part.TopSurface = Enum.SurfaceType.Smooth
Part.BottomSurface = Enum.SurfaceType.Smooth
Part.FormFactor = Enum.FormFactor.Custom
Part.Size = Pallete.Size * Vector3.new(1, 1, mag)
Part.CFrame = CFrame.new(source, target) *CFrame.new(0, 0, -mag/2)
Part.Transparency = 1
for i = 1, 6 do
local SurfaceGui = Instance.new("SurfaceGui")
SurfaceGui.Parent = Part
SurfaceGui.Face = EnumFaces[i]
local Frame = Instance.new("Frame")
Frame.BackgroundColor3 = Pallete.Color
Frame.BorderColor3 = Pallete.Color
Frame.Size = UDim2.new(1, 0, 1, 0)
Frame.Parent = SurfaceGui
end

1 comment
Simply clone a script into the part my dude.