I'm putting this script into the command bar of studio
for _, object in pairs(game.Workspace.Model:GetChildren()) do
if object.Material == "Marble" then
object.Name = "Hi"
end
end
I'm trying to make every single block in Workspace thats material is Marble be named "Hi" - Why isn't this working? No errors.

3 comments
It probably works, but you can't see the exact state of objects while you're testing a game.
It also might be because you're typing it into the command bar and not putting it into an actual script.
SuperQmod, don't the official Roblox scripting tutorial videos use the command bar in such a way?