ok so i make a Marvel game and for Human Torch from the Fantastic 4 i wanted a "Fire Fly" it works perfectly except for the fact that when i stop flying i die. this is very disappointing cause i have tried to fix it several times and i just cant. this is the clip of script that i have that i made to the original fly i have to make the fire bellow...
function Fly()
if Flying and Player and Torso and Humanoid and Humanoid.Health > 0 then
local Momentum = Vector3.new(0, 0, 0)
local LastMomentum = Vector3.new(0, 0, 0)
local LastTilt = 0
local CurrentSpeed = Speed.MaxSpeed
local Inertia = (1 - (Speed.CurrentSpeed / CurrentSpeed))
fire=Instance.new("Fire")
fire.Heat=0
fire.Size=10
fire.Parent=script.Parent.Parent["Left Leg"]
fire2=Instance.new("Fire")
fire2.Heat=0
fire2.Size=10
fire2.Parent=script.Parent.Parent["Right Leg"]
fire3=Instance.new("Fire")
fire3.Heat=0
fire3.Size=10
fire3.Parent=script.Parent.Parent["Left Arm"]
fire4=Instance.new("Fire")
fire4.Heat=0
fire4.Size=10
fire4.Parent=script.Parent.Parent["Right Arm"]
fire5=Instance.new("Fire")
fire5.Heat=0
fire5.Size=10
fire5.Parent=script.Parent.Parent.Torso
fire6=Instance.new("Fire")
fire6.Heat=0
fire6.Size=10
fire6.Parent=script.Parent.Parent.Head
BodyVelocity.maxForce = Vector3.new(1, 1, 1) * (10 ^ 6)
BodyGyro.maxTorque = Vector3.new(BodyGyro.P, BodyGyro.P, BodyGyro.P)
BodyGyro.cframe = Torso.CFrame
while Flying and Torso and Humanoid and Humanoid.Health > 0 do
if CurrentSpeed ~= Speed.MaxSpeed then
CurrentSpeed = Speed.MaxSpeed
Inertia = (1 - (Speed.CurrentSpeed / CurrentSpeed))
end
local Direction = CurrentCamera.CoordinateFrame:vectorToWorldSpace(Vector3.new(Controls.Left.Number + Controls.Right.Number, math.abs(Controls.Forward.Number) * 0.2, Controls.Forward.Number + Controls.Backward.Number))
local Movement = Direction * Speed.CurrentSpeed
Momentum = (Momentum * Inertia) + Movement
local TotalMomentum = Momentum.magnitude
if TotalMomentum > CurrentSpeed then
TotalMomentum = CurrentSpeed
end
local Tilt = ((Momentum * Vector3.new(1, 0, 1)).unit:Cross(((LastMomentum * Vector3.new(1, 0, 1)).unit))).y
local StringTilt = tostring(Tilt)
if StringTilt == "-1.#IND" or StringTilt == "1.#IND" or Tilt == math.huge or Tilt == -math.huge or StringTilt == tostring(0 / 0) then
Tilt = 0
end
local AbsoluteTilt = math.abs(Tilt)
if AbsoluteTilt > 0.06 or AbsoluteTilt < 0.0001 then
if math.abs(LastTilt) > 0.0001 then
Tilt = (LastTilt * 0.9)
else
Tilt = 0
end
else
Tilt = ((LastTilt * 0.77) + (Tilt * 0.25))
end
LastTilt = Tilt
if TotalMomentum < 0.5 then
Momentum = Vector3.new(0, 0, 0)
TotalMomentum = 0
BodyGyro.cframe = CurrentCamera.CoordinateFrame
else
BodyGyro.cframe = CFrame.new(Vector3.new(0, 0, 0), Momentum) * CFrame.Angles(0, 0, (Tilt * -20)) * CFrame.Angles((math.pi * -0.5 * (TotalMomentum / CurrentSpeed)), 0, 0)
end
BodyVelocity.velocity = Momentum
LastMomentum = Momentum
Wait(FlyRate)
end
BodyVelocity.maxForce = Vector3.new(0, 0, 0)
BodyPosition.maxForce = Vector3.new(0, 0, 0)
BodyGyro.maxTorque = Vector3.new(0, 0, 0)
end
end
function StopFlying()
Flying = false
BodyVelocity.maxForce = Vector3.new(0, 0, 0)
BodyPosition.maxForce = Vector3.new(0, 0, 0)
BodyGyro.maxTorque = Vector3.new(0, 0, 0)
script.Parent.Parent["Left Leg"]:ClearAllChildren()
script.Parent.Parent["Right Leg"]:ClearAllChildren()
script.Parent.Parent["Left Arm"]:ClearAllChildren()
script.Parent.Parent["Right Arm"]:ClearAllChildren()
script.Parent.Parent.Torso:ClearAllChildren()
script.Parent.Parent.Head:ClearAllChildren()
end
ive also tried making the fire greenish for my Dr. Strange but i dont know how to change the color!! D:
if you have time can you also tell me how to use this with particles ... cause i cant figure it out trying to use my own decals ... i just get the classic particle decal.
thank you for reading this and thank you for any help i may receive
~FinickOdre123

1 comment
Did you write this all from scratch?