Nil not going to work... Please help

Hello! I am WEcompany. I am trying to make an instance :destroy() something if nil, but if it is not nil, I will work on that later. Here is the script:

if game:GetService("Players").LocalPlayer.Characters.Zomboy2020Halloween == nil then 
	script.Parent.Parent:Destroy()
else
	-- Do later
end

Output I got:
image
Isn’t this what I want? If you can help, please let me know. Thanks, WE

Put .Value at the end of Zomboy2020Halloween.

Well the String Value doesn’t exist. That is what im trying to going for.

You have to make the value appear in the character. And is this a localscript?

Yes, it is a LocalScript. I don’t want the value to appear. I want it to stay nil because only some people have it.

Oh…

Ok so instead of seeing if its nil do this.

if not game:GetService("Players").LocalPlayer.Character:FindFirstChild("Zomboy2020Halloween") then
end
2 Likes