Help with Despawn script

Hi, I am having an issue were if a new ski lift is added while an other one is running it removes at the same when the other ski lift removes. I am wondering if there was a way that I could make it so that issue does not happen?




1 Like

Replace :remove() with :Destroy().

So far i know :remove() isn’t a thing, in this case you can better use :Destroy()

It is a thing, but it has just been depreciated for a decent amount of time.

I never used :Remove() thanks for telling me haha

Could you show us the script of when a new ski lift is added?

Sure thing Give me one second:grinning:

so here is the scripts which spawn the ski lift

--script 1
system = script.Parent

model = system.Lift --

backup = model:Clone()

regen = system.Regen

function checkRegen()

	if regen.Value == 1 then


		model = backup:Clone()

		model.Parent = system





This script Deletes the ski lift once it reaches the top of the line



The problem is that if there is a ski lift at the top and one half way up they would both delete. I was wondering if anyone knew how to make the ski lift at the top despawn and keep the other one running until it got to the top? (remove() works the same as Destroy():smiley:)

The problem is that when the script runs, there will be many models called “Lift”. The script will see that there are many models called “Lift”, so instead of breaking, it just chooses the first one it finds.

So, for me to figure out what you should do, tell me, where is this script?



Is it inside the “Lift” model?

If the answer to the question above is “Yes.”, then change the script into this:



If not, tell me where it is.

Thank you for helping me!:smile:

1 Like