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

Why do I keep getting shirt is not a valid member of player error with this uniform script?

I keep getting an error in the output saying shirt is not a valid member of Player, and I'm unsure why. Can someone help me? Here's the script

function Click(playerWhoClicked)
	if playerWhoClicked:IsInGroup(3263571) then
		playerWhoClicked.Shirt.ShirtTemplate = 850639813
	end
end

script.Parent.ClickDetector.MouseClick:connect(Click)

Thanks in advance.

1 comment

0

:Connect.

1 answer

Because MouseClick returns a player instance in Players. A shirt is stored inside the character model.

playerWhoClicked.Character.Shirt.ShirtTemplate = 850639813

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