I learnt to code random positions from a Youtube video. Then, I applied it to make my model fall from random positions. Disappointingly, the grapes only lined up. DM on discord Starlight#7272 if you want more details. This is my code:
local Grape = game.ReplicatedStorage:WaitForChild('Grape')
local grapeHeight = 100
local MinX = -100
local MaxX = 100
local MaxZ= 100
local MinZ = -100
math.randomseed(tick())
local function grape()
local GrapeCopy = Grape:Clone()
local x = math.random(MinX,MaxX)
local z math.random(MinZ,MaxZ)
GrapeCopy.Parent = workspace
GrapeCopy.CFrame = CFrame.new(x,grapeHeight,z)
game:GetService('Debris'):AddItem(GrapeCopy,math.random(10,15))
while true do
grape()
wait(1)
end
Could anyone explain why it is not working?

4 comments
I’m gonna check this when I’m home. Thank you. Also, it may be because I didn’t put random.seed(tick()) in the function, which is why I didn’t work.
I'm not sure, but I'm glad to be of help!
Oh I forgot the equal mark on line 13. Thanks for shortening the script.
No problem!