#backfire

1 messages · Page 1 of 1 (latest)

naive sun
#

Hello how can I add backfire to the car system please ? Thanks :)

naive sun
#

Or a drift trace

prime mist
naive sun
#

Sorry for my English lol

naive sun
prime mist
naive sun
#

Make it working but not all time

prime mist
naive sun
prime mist
naive sun
#

No

#

😅

prime mist
naive sun
#

Acceleration number ?

prime mist
#

or when its going fast?

naive sun
#

Yes*

#

I think when it’s going fast

prime mist
naive sun
#

Ok

#

Thanks

#

Ik how to do this
if speed > 110 end
— do the thing
end

#

If I’m not wrong

prime mist
naive sun
#

Ok but how do this a little bit randomly ?

prime mist
naive sun
#

Kk thank you so much

prime mist
naive sun
#

And how know when the car have a acceleration or deceleration ?

prime mist
naive sun
#

Im French and I’m 16 I don’t have learned this

prime mist
#

its ok

#

roblox might have smth like it

#

but you need to find ther change in speed

naive sun
#

How ?

prime mist
#

errm

prime mist
# naive sun How ?

maybe you could make a varible of the car's speed, then a second later you make another varible of the car's speed, and then you minus the second speed with the first speed to get the acceleration

naive sun
#

Ok i will try thanks

prime mist
timid harness
#

k

#

gotchu

#

So, here's the code that creates particle emitter with "working backfire"

#
local Gun = script.Parent
local Config = Gun:FindFirstChild("Config")
local Remote = Gun:FindFirstChild("Remote")
local Plir = game:GetService("Players"):GetPlayerFromCharacter(Gun.Parent)
local IsReload = false

Remote.Fire.OnServerInvoke = function(SendPlir, Hit)
    if SendPlir == Plir then
        return
    end

    local Projectile = Instance.new("Part", workspace.Camera.Projectile)
    Projectile.Size = Vector3.new(1, 1, 1)
    Projectile.Position = Gun.ShootPart.Position
    Projectile.Anchored = true
    Projectile.CanCollide = false
    Projectile.Material = Enum.Material.Neon

    -- Create a particle emitter
    local ParticleEmitter = Instance.new("ParticleEmitter", Projectile)
    ParticleEmitter.Color = ColorSequence.new(Color3.fromRGB(255, 0, 0))
    ParticleEmitter.Lifetime = NumberSequence.new(0.5)
    ParticleEmitter.Size = NumberSequence.new(0.5)
    ParticleEmitter.Rate = 50
    ParticleEmitter.EmitterSize = Vector3.new(0.1, 0.1, 0.1)
    ParticleEmitter.LightEmission = 1

    Projectile.Velocity = (Hit - Gun.ShootPart.Position).Unit * Config.Velocity.Value
end
```lua
#

This code will create a red particle emitter attached to the projectile, giving it a visual effect during its drive

naive sun
#

Ty