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

How do a create a script in a part where it destroys after its position has been changed?

Asked by 5 years ago
Edited 5 years ago

My part is unanchored and it's welded to other parts. When I explode it with a bomb/rocket launcher, it unattaches from the other parts. All I want is a way to get the part to scan its position after it is free from the other parts. (The reason I'm doing this is so I can get the part to delete itself after it's free).

2 answers

Log in to vote
0
Answered by
Sorukan 240 Moderation Voter
5 years ago

If you're looking for a way to delete the parts that's been unattached, just use :Destroy()

Ad
Log in to vote
0
Answered by
Ap_inity 112
5 years ago

All you do is:

-- Code above
wait(5) -- We are waiting for the part to stop moving
local pos = script.Parent.Position

-- Position functions below

Answer this question