This is part of a character customization Gui.. I'm trying to make it so if a shirt and pants are both detected, then a message pops up. If it doesn't detect both, then a different one is displayed. When run, the "message1" frame shows up even if the character doesn't have a 'Shirt' or 'Pants' item on them. (The shirt and pants were completely removed when they entered, so it's not that the texture just isn't set.) Thanks!
function C() if game.Players.LocalPlayer.Character:FindFirstChild("Shirt") and game.Players.LocalPlayer.Character:FindFirstChild("Pants")then script.Parent.Parent.message1.Visible = true wait(5) script.Parent.Parent.message1.Visible = true else script.Parent.Parent.message.Visible = true wait(5) script.Parent.Parent.message.Visible = true end end script.Parent.MouseButton1Click:connect(C)
-- Set this in a localscript inside of the button. local character = game.Players.LocalPlayer.Character local scheck = false local pcheck = false script.Parent.MouseButton1Down:connect(function() for i,v in pairs(character) do if v:IsA("Shirt") then scheck = true end if v:IsA("Pants") then pcheck = true end end if scheck and pcheck then script.Parent.Parent.message1.Visible = true wait(5) script.Parent.Parent.message1.Visible = false -- In the example you had this to true, assuming you meant false. else script.Parent.Parent.message.Visible = true wait(5) script.Parent.Parent.message.Visible = false -- In the example you had this set to true, assuming you meant false. end end)