How do I apply a bit of spread to spawned debris?

I’m spawning flaming parts all at the same position
How can I apply a bit of spread to this?

My only idea is to just add math.random(x, y) to each value in the position property, but is there any other less messy way to do this?

Use cframe.angle with math.random()

That will only rotate it. Also, you have provided literally no example of using your method.

Anyways, a way similar to using Position, is to set the CFrame itself:

local ogpart = workspace.Part
local part = ogpart:Clone()
part.CFrame *= CFrame.new(math.random(0, 10) / 10, math.random(0, 10) / 10, math.random(0, 10) / 10) * CFrame.Angles(math.rad(math.random(0, 360)), math.rad(math.random(0, 360)), math.rad(math.random(0, 360)))

I shouldn’t need to provide any code it’s very simple. All you need to do is rotate the part to a random angle. Pretty self explanatory. Also yes I probably should’ve explained more. But this actually could work if you move the part towards the look vector which I’m guessing they would.

nope that is not at all what im doing actually and i dont know anyone who would do that when making debris…?

1 Like

i figured out my own way a while ago, but i ended up doing this (without the angle setting since it didnt really matter too much in this case)

1 Like