Making a Door that Opens when the player has a certain clothing item

Hi there! I am trying to make a proximity prompt door that opens when the player that triggers the proximity prompt, If they have a specific Classic T-shirt, it opens the door, but It won’t work for some reason, I do not know why it won’t work.

If someone can help, please do.

local debounce = false

script.Parent.Triggered:Connect(function(plr)
	if debounce == false and game.Workspace:FindFirstChild(plr.Name)["Shirt Graphic"].Graphic == 1736633 then
		debounce = true
		script.Parent.Parent.CFrame = CFrame.new(224.718, 55.5, 57.276)
		script.Parent.Enabled = false
		script.Parent.Parent["victory.wav"]:Play()
	end
end)

Try saying .Graphic == “rbxassetid://1736633” then
instead of just giving a number.

local debounce = false

script.Parent.Triggered:Connect(function(plr)
	if debounce == false and plr.Character:FindFirstChild("Shirt Graphic") and plr.Character:FindFirstChild("Shirt Graphic").Graphic == "rbxassetid://1736633" then
		debounce = true
		script.Parent.Parent.CFrame = CFrame.new(224.718, 55.5, 57.276)
		script.Parent.Enabled = false
		script.Parent.Parent["victory.wav"]:Play()
	end
end)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.