So I am making something that requires access to a model in the players camera. BUT there is multiple items in the characters camera and they are added without a name and I CANT CHANGE THAT!! So I made a script that checks if there is a torso in the model but I get this annoying error.
Things to note : *This is in a localscript
Here is my code:
wait(1)
while wait() do
if script.Parent.WHat.LeopardFedora.Value == true then
camitems = game.Workspace.CurrentCamera:GetChildren()
for i = 1,#camitems do
if camitems[i].Torso ~= nil then -- LINE 7
camitems[i].LeopardFedora.Transparency = 0
if script.Parent.WHat.LeopardFedora.Value == false then
camitems[i].LeopardFedora.Transparency = 1
end
end
end
end
end
ERROR : 01:35:41.857 - Torso is not a valid member of Model 01:35:41.857 - Script 'Players.Player.PlayerGui.Main.GiveWearHat', Line 7 01:35:41.858 - Stack End
Thanks if you can help!

1 comment
thanks