|
| 04 May 2016 07:54 PM |
| I want to make a script that checks if something isn't present, and if it isn't the script will continue. How do I do that? |
|
|
| Report Abuse |
|
|
|
| 04 May 2016 07:55 PM |
Use the "not" operator with a conditional statement
|
|
|
| Report Abuse |
|
|
Dr_Doge
|
  |
| Joined: 07 Dec 2011 |
| Total Posts: 645 |
|
|
| 04 May 2016 07:56 PM |
if not game.workspace.Part then print'Parts not in workspace!' else print'Part IS in workspace!' end |
|
|
| Report Abuse |
|
|
|
| 04 May 2016 08:04 PM |
^ That would error if part doesn't exist; use FindFirstChild:
if workspace:FindFirstChild("Part") then --code here end |
|
|
| Report Abuse |
|
|
|
| 04 May 2016 08:06 PM |
forever, it would work fine.
|
|
|
| Report Abuse |
|
|
|
| 04 May 2016 08:07 PM |
nvm, i didnt read how you said "if the part doesnt exist"
|
|
|
| Report Abuse |
|
|