I'm making a script that needs to see if a local part exists or not. please help!
If the "local part" is created by the client, it will simply not exist on the server due to properties of Filtering Enabled.
The part will only exist on the client. If you want to check if a part exist on both the client and the server you can use a RemoteEvent to send the part object and check if it's nil or not.
--server RemoteEvent.OnServerEvent:Connect(function(player, part) if (part) then print(part.Name .. " exists on server.") else print("Part doesn't exist on server.") end end) --client RemoteEvent:FireServer(workspace.Baseplate) RemoteEvent:FireServer(Instance.new("Part", workspace))
Baseplate exists on server.
Part doesn't exist on server.
for _, Model in pairs(workspace:GetChildren()) do if Model.Name = "ButtonModel" then code else code end end