local sen2 = script.Parent.Sen2
local link = game:GetService("BadgeService")
--//
local shirt = "http://www.roblox.com/asset/?id=1645743"
local shirt2 = "http://www.roblox.com/asset/?id=1358153"
local shirt3 ="http://www.roblox.com/asset/?id=1565203"
local sc = script.Parent.Screen.SurfaceGui.Frame
function onTouched(hit)
local human = hit.Parent:FindFirstChild'Humanoid'
local pla = game.Players:GetPlayerFromCharacter(hit.Parent)
if human then
--//Shirt1
if hit.Parent:FindFirstChild'Shirt Graphic' then
if hit.Parent["Shirt Graphic"].Graphic == shirt or hit.Parent["Shirt Graphic"].Graphic == shirt2 or hit.Parent["Shirt Graphic"].Graphic == shirt3 then --basically just checks if the texture == any of the shirt variables.
sc.fa.Visible = false
sc.re.Text = "yes"
sc.re.Visible = true
elseif hit.Parent["Shirt Graphic"].Graphic ~= shirt or hit.Parent["Shirt Graphic"].Graphic ~= shirt2 or hit.Parent["Shirt Graphic"].Graphic ~= shirt3 then
sc.re.Visible = false
sc.fa.Text = "no"
sc.fa.Visible = true
end
end
end
end
script.Parent.Sen2.Touched:connect(onTouched)
I am wearing the (1565203) id, but it still says that I'm not wearing the right tshirt

3 comments
It's early for me which is why I am not posting this as an answer but a comment. If this is a gui (which it looks like it) you need to use script.Parent.Sen2.MouseButton1Down:connect(onTouched) when you call the function.
no its not a gui
it runs the function, not correctly though