i am trying to dupe a object but it is not working
local bullet = script.Parent.bullet
local dupes_of_bullet = bullet.bullets.Value
local turret_assaigned = bullet.turret_assaigned.Value
local bullet_clone = bullet:Clone()
local bullets_existing = bullet.bullets_existing.Value
local next_pos = bullet.next_position.Value
dupes_of_bullet = math.random(0, 10)
if dupes_of_bullet == 0 then
warn("did not show bullet cuz dupe count = 0")
end
if dupes_of_bullet == 1 then
bullet.Parent = turret_assaigned
end
if dupes_of_bullet >= 2 then
repeat
next_pos = next_pos - 1
bullets_existing = bullets_existing + 1
bullet_clone.Parent = turret_assaigned
bullet_clone.Position = next_pos
until bullets_existing == dupes_of_bullet
end
p.s the object i want to dupe is in server script storage
