So Im trying to make a script that if lets say... a Part does not exist then it would print out (Part no Exist)
this was the script that I was just playing around with.
if workspace.Part then print("Good!") else print("Bad!") end
But the Output only says
Part is not a valid member of Workspace
Any tips?
This is actually quite simple. Here's how:
if workspace:FindFirstChild("Part") then -- Detects if a part named Part is actually in workspace and detects if its nil or not print("Good!") else print("Bad!") end
You can read more on :FindFirstChild()
here. Please accept this answer if this helped!