Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Shirt won't change?

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

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

local found = player.Character:FindFirstChild("Shirt")

1 comment

0

No change.

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!

1 comment

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.