Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

my bighead all script doesn't work, does anyone know the error?

i'm trying to make a bighead all script for admin in my game but i get this error when it runs

Expected 'then' when parsing if statement, got '='

here's my code


for i,v in pairs(workspace:GetChildren()) do
	if v.Name = "head" then
		v.Size = Vector3.new(10,10,10)
	end
end

if anyone can help me that would be great

2 comments

0

The error makes no sense. I think that's from another script. The thing you are doing wrong here is that there aren't any heads in the workspace. You have to go into a character model and check if there is a head inside of that. Also it's not "head" it's "Head". It has a uppercase letter.

0

So basically just say for i,v in pairs(game.Workspace:GetChildren()) do if v.ClassName == "Model"

2 answers

if v.Name == "head" then

not

if v.Name = "head" then

also the error must be from another script

You only use a single = sign when assigning a value. In your script, you should convert if v.Name = "head" then to if v.Name == "head" then.

This discussion is preserved as it was. New answers, comments, and votes are closed.