Hello fellow developers ! I have created some powers for my game like extra speed , extra health etc and I want to spawn them randomly in the game map but I don’t know how to do that so can I pls get some help regarding this. I will really appreciate it.
you can use math.random, it returns a random number
example code:
local part = --part to be multiplied
local countdown = 1
while wait(countdown) do
local newPart = part:Clone()
newPart.Parent = workspace
newPart.Position = Vector3.new(math.random(minX, maxX), math.random(minY, maxY), math.random(minZ, maxZ))
end
Thank you very much but I have come to the conclusion of not including power ups. Then also u have my thanks
Does it include prepared spawn locations?