local UIS = game:GetService("UserInputService") function spawnsphere () local new100parts = Instance.new("Part") new100parts.Parent = workspace new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() new100parts:Clone() end UIS.InputBegan:Connect(function(input) if input.KeyCode == Enum.KeyCode.F then print("RIP") spawnsphere() end end)
Hey!
You should use a for-loop:
function spawnsphere() local new100parts = Instance.new("Part", workspace); for i = 1, 100 do new100parts:clone().Parent = workspace; end end game:GetService('UserInputService').InputBegan:connect(function(input) if input.KeyCode == Enum.KeyCode.F then spawnsphere(); end end)