Hi, I’m trying to loop through workspace and find any parts of the name “demoblock” or “demodeleteblock”, and after checking that the localplayer (this is a LocalScript) owns the part (ownership is kept by using a StringValue named Owner), the part is deleted.
However for some reason, the v.Name check just accepts everything?
for i, v in pairs(workspace:GetChildren()) do
if v.Name == "demoblock" or "demodeleteblock" then --This lets everything through?
if v.Owner.Value == player.Name then
v:Destroy()
end
end
end
Of course Owner isn’t a valid member of Camera, but Camera I believe shouldn’t even be checked for Owner. Adding [and v.Name ~= “Camera”] only lets the next thing in workspace through.
help would really be appreciated