CURRENT SCRIPT :
local sen2 = script.Parent.Sen2 local link = game:GetService("BadgeService") --// local shirt = "http://www.roblox.com/asset/?id=1645743" 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 then sc.fa.Visible = false sc.re.Text = "yes" sc.re.Visible = true elseif hit.Parent["Shirt Graphic"].Graphic ~= shirt then sc.re.Visible = false sc.fa.Text = "no" sc.fa.Visible = true end end end end script.Parent.Sen2.Touched:connect(onTouched)
As you can see here I only am checking 1 tshirt in the script at the moment, how can I change this so I can have possibly a folder of number values that consist of tshirt IDs, and it goes through checking them all seeing if the player is wearing at least one of the real tshirt it prints "yes"
Well, like I said before, I personally this isnt a very professional way of checking a person wearing a tshirt, but since the script works I guess you can keep it.
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=IDHERE" local shirt3 ="http://www.roblox.com/asset/?id=IDHERE" 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)