Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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!!

2 comments

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

0

ok I will see if I can find the error

This discussion is preserved as it was. New answers, comments, and votes are closed.