Im tryna make if a part is Marble material then set the Y size to 0.325. It isnt working im using the InCommand plugin to instantly do It and its not working heres the script.
local map = game.Workspace.Map
local parts = map:GetDescendants()
for _, part in pairs(parts) do
if part:IsA("Part") and part.Material == "Marble" then
part.Size.Y = 0.325
end
end
local map = game.Workspace.Map
local parts = map:GetDescendants()
for _, part in pairs(parts) do
if part:IsA("Part") and part.Material == Enum.Material.Marble then
part.Size = Vector3.new(part.Size.X, 0.325, part.Size.Z)
end
end
*If that does not work, then either the material is not set correctly or the part is not a descendant of Map.