local Debri = Instance.new("Part") Debri.BrickColor = part.BrickColor Debri.Material = part.Material Debri.Anchored = true Debri.CanCollide = true Debri.Size = Vector3.new(math.random(5, 20), 4, math.random(5, 20)) Debri.CFrame = CFrame.new(Carbons[DMGSelect].Position) * CFrame.Angles(math.random(math.pi/1.2 , -math.pi/1.2), math.random(math.pi/1.2 , -math.pi/1.2), math.random(math.pi/1.2 , -math.pi/1.2)) Debri.Parent = workspace Debri.TopSurface = 10 Debri.BottomSurface = 10
It keeps giving me an error that says Players.Player.Backpack.DebriScript:07: bad argument #2 to 'random' (interval is empty)
I don't know why this happens please help.
Puppy thinks that the first bit of random has to be smaller than the second bit so maybe put the pi first but maybe it is not that puppy has an idea
math.random(math.pi/1.2 , -math.pi/1.2)
Should become
(math.random()-0.5)*math.pi*2.4
that will be better because random doesn't work on decimals