Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Shirt won't change?

Asked by
emite1000 335 Moderation Voter
10 years ago

I've re-worded this script in a million different ways but I can't figure out what's wrong. I have a SHirt on while testing this in a server.

game.Players.PlayerAdded:connect(function(player)
    player:WaitForDataReady()
    player.Character:FindFirstChild("Shirt")
        if found then found.ShirtTemplate = ("http://www.roblox.com/asset/?id=137904320")
    end
    end)

I'm completely stuck on what to do. This part of the script gives no output.

2 answers

Log in to vote
0
Answered by 10 years ago

You don't have anything in the script that suggests 'found' is a thing. Try this:

local found = player.Character:FindFirstChild("Shirt")
0
No change. emite1000 335 — 10y
Ad
Log in to vote
0
Answered by 10 years ago

Hmm, try this;

if game:FindService("Players")then
print("Script Loaded")
game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
wait(2)
for i,v in pairs(char:GetChildren())do
if v:IsA("Shirt")then
v.ShirtTemplate="http://www.roblox.com/asset/?id=137904319"
end
end
end)
end)
end

Hope this helped!

0
It prints Script Loaded, but then nothing happens. I added a print command right after line 7, but it didn't appear in the output. emite1000 335 — 10y

Answer this question