Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 4 years ago
Edited 4 years ago

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

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. NordicM 77 — 4y
0
So basically just say for i,v in pairs(game.Workspace:GetChildren()) do if v.ClassName == "Model" danklua 72 — 4y

2 answers

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

if v.Name == "head" then

not

if v.Name = "head" then

also the error must be from another script

Ad
Log in to vote
0
Answered by
SirGamezy 186
4 years ago

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.

Answer this question