I am writing a script that creates a part and changes it's properties as needed. I also need to add a Decal to each surface (the same decal on every surface).
The PartHelpers.SmoothPart(Part) (line #: 11) function smooth's all of the surfaces, I want to create a similar function for the Decals
Could someone please help me with the code that will add a decal to the part created with the HealthPowerup function?
local function HealthPowerup()
local Part = Instance.new("Part", workspace)
Part.Size = Vector3.new(3,3,3)
Part.CanCollide = true
Part.Position = Vector3.new(math.random(100),4, math.random(100))
Part.Shape = 0
Part.BrickColor = BrickColor.new("Bright red")
Part.Transparency = .5
Part.Anchored = true
PartHelpers.SmoothPart(Part)
end
SmoothPart = function(p)
p.BackSurface = 0
p.TopSurface = 0
p.BottomSurface = 0
p.FrontSurface = 0
p.LeftSurface = 0
p.RightSurface = 0
end
