Get a more realistic fire effect

Hey, I have made a magic attack system with fire and been wondering if anybody had any suggestions or can help me out get a better effect on this fire.

Here would be the Roblox game.


Not trying to advertise but my video recording program is a little bugged and might have though experiencing it yourself would be better.

When you get in game, chat “team me black magic”, after that press C on your keyboard and a fireball should shoot our of your HumanoidRootPart to the direction you are facing.

The real issue with it is that sometimes it misses when it makes a collision with a character/Humanoid. If nobody is in the game, then test it out on the NPCs near the boards.

Here’s some of the code for it

				local Fireball;
				local IsExecuted = false;
				
				if PlayerCurrentTeam == 'Black Magic Witch' or mtp ~= 1 then
					Fireball = game.ServerStorage.FireballPack.BlackMagic:Clone();
					mtp = 10;
				else
					Fireball = game.ServerStorage.FireballPack.Witch:Clone();
				end;
				Fireball.BodyVelocity.Velocity = plr.Character.HumanoidRootPart.CFrame.LookVector * 45; -- Here to change fireball speed
				Fireball.CFrame = plr.Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, -1.5);
				Fireball.Parent = game.Workspace;
				local function fireBallDestruction()
					if Fireball then
						Fireball:FindFirstChild'PointLight':Destroy();
						Fireball.ParticleEmitter.Enabled = false;
						Fireball.Anchored = true;
						wait(.5);
						Fireball:Destroy();
						FireballConnection:Disconnect();
					end;
				end;
				delay(10,function()
					if not IsExecuted then
						fireBallDestruction();
					end;
				end);
				FireballConnection = Fireball.Touched:Connect(function(hit)
					local HumanoidFound = hit.Parent:FindFirstChild'Humanoid' or hit.Parent.Parent:FindFirstChild'Humanoid';
					if HumanoidFound and HumanoidFound.Parent.Name ~= plr.Name and not IsExecuted then
						spawn(fireBallDestruction);
						IsExecuted = true;
						local DamageToDeal = 30+(mtp*6);
						local InsertedObjects = {};
						for _, v in ipairs(game.ServerStorage.FireParticles:GetChildren()) do
							local Object = v:Clone();
							Object.Parent = HumanoidFound.Parent.HumanoidRootPart;
							table.insert(InsertedObjects, Object);
						end;
						for i = 1, 5 do
							HumanoidFound:TakeDamage(DamageToDeal/5);
							wait(1);
						end;
						for _, v in ipairs(InsertedObjects) do
							v.Enabled = false;
							delay(2.5, function()
								v:Destroy();
							end);
						end;
						FireballConnection:Disconnect();
					end;
				end);

Thanks!

2 Likes

If you also perhaps have any suggestions to add to my code or any improvements, I gladly am accepting comments on that too! :slight_smile: