Orientation not changing on Part

I’m trying to randomize the orientation on a part before it emits particles to give a randomized slash effect. I have tried multiple ways here and It wont change the orientation but doesn’t give me any console errors. Any help?

Effect is a part with particleEmitters as children

local VFXRemote = game.ReplicatedStorage.Remotes.VFXRemote

VFXRemote.OnClientEvent:Connect(function(data)
local Effect = data.VFX:Clone()

Effect.Parent = workspace

	if data.OtherEffect == "RandomOrientation" then
		Effect.CFrame = CFrame.Angles(0,math.random(math.rad(0),math.rad(360)),0)
		print("Random!")
	end
	
Effect.CFrame = data.CFrame 
	 for i, v in Effect:GetChildren() do
			if v:IsA("ParticleEmitter") then
				v:Emit(v:GetAttribute("EmitCount"))
			end
	 end
	 game.Debris:AddItem(Effect,data.DeleteTime)
end)

If there is any data that might be missing here please ask

1 Like

And the print “Random!” was to make sure it is meeting the RandomOrientation requirement (and it does)

Effect.CFrame *= CFrame.Angles(0,math.random(math.rad(0),math.rad(360)),0)
1 Like

This still doesn’t change the orientation at all for some reason

1 Like

I have the same problem, I tried everything but am unable to change the orientation.

Is it possibly a bug?

I had this problem before when doing VFX and was able to fix it after troubleshooting but I can’t this time so I’m not sure what is different

this line might be overriding the orientation you set earlier

1 Like

… I just entirely missed that line. Of course the line that resets the orientation prevents me from seeing any change… I appreciate the help!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.