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

How would you do something like this?

Asked by 10 years ago
RandomVal.Value = script.Parent.Parent

I tried this. I wanted to make something like this,

RandomVal.Value.Part:Destroy()

But, it ends with a error. Please help!

0
Please help. Is there any alternative? That would work too drslicendice 27 — 10y

1 answer

Log in to vote
0
Answered by
Relatch 550 Moderation Voter
10 years ago

It seems as if you are trying to change the value to script.Parent.Parent. You can try something like this to check if it's a certain value, then destroy the part.

if RandomVal.Value == script.Parent.Parent then
    RandomVal.Part:Destroy()
end
Ad

Answer this question