Hello!
I have been having an issue for a while now where some letters emitted on a part flip upside down when the part rotates somewhere between >= 90 to <= -90 degrees.
I don’t seem to find anyone with the same problem either, so I don’t know what it could be
If anyone knows how/why this happens, I’d appreciate the help!
local emitter = script.Parent
local fire = emitter.Fire
local smoke = emitter.Smoke
local letter = emitter.Letter
local letters = {
A = "rbxassetid://90569603787654",
B = "rbxassetid://128105024291381",
K = "rbxassetid://98441032026905",
L = "rbxassetid://160551931",
O = "rbxassetid://160552368",
M = "rbxassetid://160552160",
exclamationMark = "rbxassetid://16933997761"
}
-- Spawn letters
local function spawnLetter(texture, rotation)
emitter.Rotation = Vector3.new(emitter.Rotation.X, emitter.Rotation.Y, rotation)
local clone = letter:Clone()
clone.Parent = emitter.Attachment
clone.Texture = texture
clone.Rotation = NumberRange.new(rotation, rotation)
clone:Emit(1)
game:GetService("Debris"):AddItem(clone, clone.Lifetime.Max + 1)
end
local function explosions(num)
for i = 1, num do
fire:Emit(1)
task.wait(0.1)
end
end
while task.wait(3) do
local cor = coroutine.create(explosions)
coroutine.resume(cor, 3)
smoke:Emit()
local sequence = math.random(2, 2)
if sequence == 1 then
-- BOOM!
spawnLetter(letters["B"], 30)
task.wait(0.05)
spawnLetter(letters["O"], 15)
task.wait(0.05)
spawnLetter(letters["O"], 0)
task.wait(0.05)
spawnLetter(letters["M"], -15)
task.wait(0.05)
spawnLetter(letters["exclamationMark"], -30)
else if sequence == 2 then
-- KABOOM!
spawnLetter(letters["K"], 45)
task.wait(0.05)
spawnLetter(letters["A"], 30)
task.wait(0.05)
spawnLetter(letters["B"], 15)
task.wait(0.05)
spawnLetter(letters["O"], 0)
task.wait(0.05)
spawnLetter(letters["O"], -15)
task.wait(0.05)
spawnLetter(letters["M"], -30)
task.wait(0.05)
spawnLetter(letters["exclamationMark"], -45)
task.wait(0.05)
end
end
--task.wait(100)
end
The emit direction of a ParticleEmitter’s particles depends on the Orientation of its parent.
→ Idea: Create a new part with Orientation 0,0,0. Make it invisible, CanCollide and CanQuery false, all those things so it isn’t noticeable by players. Then, use that part for emitting instead of the parent part. Destroy it afterwards when the effect is done.