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
This is what I came up with, and I hope it solves your problem.
First, I changed all of your FindFirstChild'arg'
to FindFirstChild("arg")
, I'm not sure it made a difference in anything though.
Next, I shortened your shirt IDs, also does nothing except make things look nicer.
And also, what may have been causing the problem: your elseif statement thought that if the player wasn't wearing all three of the shirts, it should execute.
local sen2 = script.Parent.Sen2 -- local link = game:GetService("BadgeService") -- Disabled this, because there's no reason to have it. -- If the script is still broken, try re-enabling it, I might have broken it again by doing this. --// local shirt = "rbxassetid://1645743" local shirt2 = "rbxassetid://1358153" local shirt3 ="rbxassetid://1565203" local sc = script.Parent.Screen.SurfaceGui.Frame function onTouched(hit) if hit.Parent:FindFirstChild("Humanoid") then local human = hit.Parent:FindFirstChild("Humanoid") local pla = game.Players:GetPlayerFromCharacter(hit.Parent) --//Shirt1 if human.Parent:FindFirstChild("Shirt Graphic", true) 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 else sc.re.Visible = false sc.fa.Text = "no" sc.fa.Visible = true end end end end script.Parent.Sen2.Touched:connect(onTouched)
If my solution solved your problem, leave me an upvote and accept my answer. Thanks!