Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 5 years ago

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

2 answers

Log in to vote
0
Answered by
Prestory 1395 Moderation Voter
5 years ago

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)
Ad
Log in to vote
0
Answered by 5 years ago

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

0
hes suspended Mr_Unlucky 1085 — 5y
0
?? Creeperthekid32 70 — 5y
0
Am I not allowed to try to help? Creeperthekid32 70 — 5y
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. SharkyNarlyYTAlt 26 — 5y
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. Creeperthekid32 70 — 5y

Answer this question