Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make a plane despawn after I jump out?

So Im new to this type of stuff, Im just wondering, how would I make a Plane despawn after I jump out?

2 answers

✓ Accepted answer

Insert this as a script into the plane

This is an example

This is how you would do it there is a weld inserted into the vehicle seat when a player sits on it and this detects when it is destroyed ( when the player jumps out of the seat) and destroys the plane.

script.Parent.ChildRemoved:Connect(function()
	game.Workspace:WaitForChild("Plane"):Destroy() -- change "Plane" to the models name
end)

print("Hello SharkyNarlyYT!")

To achieve a system like this, we must first plan.

A way you could do it, is whenever the player hits a certain position, the plane will de-spawn.

Using a system, x being the player:

plane:Clone().Parent = workspace

if x>positionNumber then
plane:Destroy()
end

Usually whenever encountering a situation to plan about, using methods similar to what's trying t be achieved, this is usually always the first idea.

Another way is to have a part, long and wide enough, set on CanCollide = false and make a statement seeing if the player has gone through where the block is.

'x' Is the player again:

local hb = workspace.Part

if x >= hb.Position then
plane:Destroy()
end

There are many other methods, but these are pretty solid ones that I could think of. Any other ideas are up for you to decide!

Thank you, any problems or questions should be messaged immediately on my public social media;

Roblox ~ Creeperthekid32

Twitter ~ @somecreep32

Discord ~ Creep#7611

5 comments

0

hes suspended

0

??

0

Am I not allowed to try to help?

0

For the first answer, I used the script and tried to put it inside the tool, where am I supposed to put it? Inside the tool or the seat.

0

It's not the answer, it is simply a layout. You'd need to define x as the player's position, it was only used as a substitutute.

This discussion is preserved as it was. New answers, comments, and votes are closed.