Tried this:
game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(chr)
chr.Torso.roblox:Destroy()
end)
end)
Tried this:
game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(chr)
chr.Torso.roblox:Destroy()
end)
end)
When you search for roblox it could be anything in general. T-shirts in roblox aren't considered 'T-shirts' instead, they are classified as ShirtGraphic. Now, how do we access the Torso and remove the ShirtGraphic? By using the pairs function, in a nutshell, a pairs function breaks a table down; grouping all the values in a single Variable.
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(char)
local torso = char:WaitForChild("Torso")
for index, value in pairs(torso:GetChildren()) do
end
end)
end)
Continuing on, to check if one of the values is a ShirtGraphic, we'll use the IsA function.
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(char)
local torso = char:WaitForChild("Torso")
for index, value in pairs(torso:GetChildren()) do
if value:IsA("ShirtGraphic") then
value:Destroy()
end
end
end)
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.