local fountain =script.Parent
local a = 0
local b = 0
local debounce = false
p = math.random(3)
o = math.random(3)
y = math.random(3)
while b == 0 do
p = math.random(3) + math.random(3)
b = math.random(3) + math.random(3)
y = math.random(3) + math.random(3)
wait(.1)
end
while a == 0 do
local part = Instance.new("Part")
part.Size = Vector3.new(1,1,1)
part.Shape = Enum.PartType.Block
part.Transparency = 0.5
part.BrickColor = BrickColor.new("Deep blue")
part.Velocity = Vector3.new(0,10,0)
part.CFrame = CFrame.new(fountain.Position + Vector3.new(p,o,y))
part.Parent = game.Workspace
wait(.1)
end
I am trying to make it so when a block spawns, the water block, it spawns randomly every time it spawns, but once it spawns somewhere, it seems to spawn from that location only... I'm not too good with math.random as you can see...
