So im trying to make a script that when I click a textbutton it spawns a part but add a 1% chance to spawn a red part.I also need help trying to find out how to spawn that part at a certain position.This is my current script:
myPart = Instance.new("Part",game.Workspace) script.parent.MouseButton1Click:Connect(function() Instance.new("Part",game.Workspace) end)

1 comment
If you want a 1% change, you can use math.Random.