Need help with random orientation!

I’m trying to give each part a different orientation but they’re all the same orientation.

script.Parent.OnServerEvent:Connect(function(plr)
	local char = plr.Character
	local Range = game.ServerScriptService.Powers.Kitsuri:WaitForChild("MistSlash"):Clone()
	Range.Parent = plr.Character
	

	local RotationFolder = script.RotationFolder:GetChildren()
	local randomRotation = RotationFolder[math.random(1, #RotationFolder)]
	wait(0.2)
	for i,v in pairs(plr.Character.MistSlash:GetChildren()) do
		
		v.CFrame = plr.Character.HumanoidRootPart.CFrame + Vector3.new(0,0,-0.5)
		v.Orientation = randomRotation.Orientation + Vector3.new(0,-95,0)
	end
end)

Why not make this way to be random?

v.Orientation = CFrame.new(math.random(0,360), math.random(0,360), math.random(0,360))

1 Like

I only want the first axis to move and not the whole thing.

Nevermind, I managed to fix it. Thank you so much!