I have a script, is there an easier way to do this?
if script.Parent.RedX.Visible=true and script.Parent.Parent.Target2.RedX.Visible=true and etc.. then print("All targets have been killed! Points have been added! Now teleporting back to lobby") end
Yes, remove the =true
and it will work. The correct term was == true
, but just if script.Parent.RedX.Visible then
will work.
In case you got confused, here's your script fixed up.
if script.Parent.RedX.Visible and script.Parent.Parent.Target2.RedX.Visible and etc.. then print("All targets have been killed! Points have been added! Now teleporting back to lobby") end