The script is supposed to check if player is a player and if the player is a player then it sets all parts in the model to CanCollide = false, but if its not a player then it sets CanCollide = true for al the parts in the Model. All the parts in the Model are named Cannotdelete. Why is the script not working?
local Players = game:GetService("Players") local player = Players.LocalPlayer local model = workspace.Grid.Model for _, child in ipairs(model:GetChildren()) do if child:IsA("BasePart") then if player then child.CanCollide = false else child.CanCollide = true end end end