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

Script.Parent Method is glitching?

Everytime I use the Parent method, for example torso = script.Parent:findFirstChild("Torso") the script will ouput in red torso is not a valid member of "hat1"... Anyone know what the problem is or why its doing ? And yes, The script isn't in any descendant of the player its inside of the player and player is its parent. So it should locate torso.?

1 answer

You've got to add an extra .Parent

Your script is currently looking for "Torso" inside the parent of the script. AKA, the "hat1"

script.Parent.Parent:findFirstChild("Torso")

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