Hey. I want to make a emergency gui that when you lick it it starts a fire and a explosion effect at the engine. but how can i do that? the parts for it should be E1 and E2
Fire should be self explanatory, just put it into the part and have it enable when your event fires.
For the explosion, assuming you aren’t wanting custom explosions, you’ll probably need to do an Instance.New(“Explosion”) then set its position to the part’s position to get the visible effect. The issue being that the airplane is, well, an airplane; and explosions are position-based and don’t like moving too much.
and what will be the script for that
Depends on what you have on your UI.
You could add a script to a button and use a .clicked event to trigger those effects.
i did that alrready. Any opinion?
Test it, and make sure the explosion works how you want it to work.
function PlaySound( )
script.Parent.Parent.Sound: Play( )
end
script.Parent.MouseButton1Click:connect (PlaySound)
Is this your only function related to the effects?
well im not good at scripting lol
If it’s your only function, you need a variable housing the Instance.new(“Explosion”) line. Then you’ll have to refer to this variable in order to do anything else.
As far as fire is concerned, you can choose to make a variable for it or not.
Ex. workspace.X.Fire.Enabled = true
Where X is the directory towards the fire object.
Ok, lets say you have a UI Ready with 2 buttons inside. 1 saying E1 another saying E2
In each engine add a part an name it E1FireSpawnPart and E2FireSpawnPart
- for each part. make the settings:
CanColide = false
Transparency = 1
in the UI > E1 button, Insert a local script and type
local SpawnPartE1 = --Where you part is
local Fire = Instance.new("Fire") --This makes a NEW Fire
script.Parent.MouseButton1Click:Connect(function()
Fire:Clone()
Fire.Position = SpawnPartE1
end)
Do the same for the Engine 2 button but edit some of the variables
the parts are in
CRJ-200
Planekit
OtherParts
Animations
