Script for a whole model

Hi!
I am having a question: can you make a script to affect a whole group of model? If yes, I need help with a script to make for a whole model to make CastShadow off for every part in it. I am noob at scripting and I need help with this.

1 Like

I’m not gonna give you a whole script, just because that’s not what the devforum is for, but I’d advise you look into using a for loop :slight_smile: for i, v in pairs(Model:GetChildren()) do

1 Like

You can specify the parent where Workspace is.

for _, i in pairs(game:GetService('Workspace'):GetDescendants()) do
	if i:IsA('BasePart') then
		i.CastShadow = false
	end
end
3 Likes

Looping through the parts that have the given tag will be just as bad on performance as looping through the children of a model.

3 Likes