**What I Want ** : When you click the button if the model does not have the stated shirt Id then it will be destroyed and will create the shirt Id, But it dosen't work as seen.

Script It's a local script in a Gui Button Btw

Subject = game.Workspace.Noob
Select = script.Parent.Parent.Selected
Player = Subject
Character = Subject
module3D = require(script.Parent.Parent.Parent.Parent.Parent.Module3D)
guy = workspace.Noob
Model = game.Workspace.Camera:WaitForChild("Item")
Thing  = Model:FindFirstChild("Shirt")


function Check()
	
	if Model:FindFirstChild("Shirt") then
		 if Model.Shirt.ShirtTemplate == "http://www.roblox.com/asset/?id=201164991"
		then
		
		else
			Model:Destroy()	
		end

else
	
	Model:Destroy()	
	end
	
end



script.Parent.MouseButton1Down:connect(function()

if Character:findFirstChild("Shirt") then
Character.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=201164991"
else
local Shirt = Instance.new("Shirt")
Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=201164991"
Shirt.Parent = Character
end 
script.Parent.Parent.Parent.Parent.Parent.LocalScript.Disabled = true
wait(.5)
script.Parent.Parent.Parent.Parent.Parent.LocalScript.Disabled = false
wait(.5)
Check()



end)

Problem It dose not change the shirt Id, nor deleted the model.

5 comments

0

All heirarchy is correct btw

0

Is there a Humanoid inside the "Subject"?

0

yes

0

no errors

0

make a bunch of print debugs and try again.