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

the script is supposed to pick one and delete the other two, can someone help?

Asked by 2 years ago
local a = script.Parent.GuardInfantryOF
local b = script.Parent.GuardInfantryOF1
local c = script.Parent.GuardInfantryOF2
wait(5)
math.random(a,b,c)
script.WaitForChild(math.random)
if  a then
    script.Parent.GuardInfantryOF2 = nil
    script.Parent.GuardInfantryOF1 = nil
elseif 
    b then
    script.Parent.GuardInfantryOF2 = nil
    script.Parent.GuardInfantryOF = nil
elseif
    c then
    script.Parent.GuardInfantryOF1 = nil
    script.Parent.GuardInfantryOF = nil
end

1 answer

Log in to vote
0
Answered by 2 years ago

Instead of nil try Destroy() Example of line 17

script.Parent.GuardInflantryOF:Destroy()

[I don't know if this would help at all, but you can try it] Can you also explain what your script is for and what is GuardInflantryOF?? Hope this helps!!

0
guardinfantryOf is the model inside the r6 character and i dont think Nil or Destroy is the problem the problem is that math.random doesnt as i would say accept a,b,c as a item to choose robertonom 0 — 2y
0
ok I will see if I can find the error theking66hayday 841 — 2y
Ad

Answer this question