So I made this script and it only adds one but I want it to add multiple here's the script.
local Storage = game.ServerStorage local RandomNumber = math.random(10, 100)
local Gem = Storage.Gem:Clone() while true do wait(RandomNumber)
Gem.Parent = game.Workspace Gem.CFrame = game.Workspace.GemSpawner.CFrame print("Added") end
The way you have it, you are dealing with 1 instance, the cloned gem, instead of repeatedly cloning the gem.
All you have to do is clone the gem while inside the while loop rather than outside:
local Storage = game.ServerStorage local RandomNumber = math.random(10, 100) -- local Gem = Storage.Gem:Clone() -- ^^Used to be here local OriginalGem = Storage.Gem while true do wait(RandomNumber) local Gem = OriginalGem:Clone() -- Now the gem is cloned here Gem.Parent = game.Workspace Gem.CFrame = game.Workspace.GemSpawner.CFrame print("Added") end