I don't understand why the PartSizeMax cannot be 0.1. Are decimals not usable in this case? If so, why, and what other options are there? Any other tips for making this better are welcome as well!! I'm very very new to lua.
local PartSizeMax = 1
local PartSpreadMax = 50
local function ballAnim(part)
local PartSizemodifier = math.random(0.1, PartSizeMax)
for count = 1, 50 do
part.Transparency = count / 50
part.Size = Vector3.new((PartSizemodifier * count), (PartSizemodifier * count), (PartSizemodifier * count))
task.wait(0.01)
end
part:Destroy()
end
while true do
local MyPart = Instance.new("Part", workspace)
MyPart.CanCollide = false
MyPart.Shape = "Ball"
MyPart.Anchored = true
MyPart.Position = Vector3.new(math.random((PartSpreadMax * -1), PartSpreadMax), 0, math.random((PartSpreadMax * -1), PartSpreadMax))
MyPart.BrickColor = BrickColor.new("Medium blue")
MyPart.Material = "SmoothPlastic"
task.spawn(ballAnim, MyPart)
task.wait(0.1)
end```l
** You are now Level 9! **