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

Shirt isn't a valid member of a model?

I have the error : Shirt isn't a valid member of an model.

wait(3)
Player = script.Parent.Parent.Parent
c = Player.Character
n = script.Parent
mouse = Player:GetMouse()

function hit(mouse)
	c["Shirt"].ShirtTemplate = "http://www.roblox.com/asset/?id=17527206"
	c.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=165863810"
end

function onSelected(mouse)
	mouse.Button1Down:connect(function() hit(mouse) end)
end

n.Selected:connect(onSelected)


I tried this too

c.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=17527206"

But it gave me the same error.Any help?

2 comments

0

Give the actual output and we can help better.

0

See if the shirt is VALID, some people don't wear shirts because they buy hats and etc.

1 answer

if not c:FindFirstChild("Shirt") then
	
end

Checks if the shirt is there or not

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