Here is my script:

local tool = script.Parent.Parent.Parent

tool.AncestryChanged:Connect(function(c, p)
	if p:FindFirstChild('Humanoid') then
		if tool.PN.Value == "" then
			tool.PN.Value = p.Name
		end
	end
end)

tool.Equipped:Connect(function()
	script.Parent.Decal.Texture = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&username="..tool.PN.Value
end)

5 comments

0

Was the url copied to the decal?

0

Yes. With the player's name at the end as it should.

0

Is this a local or server script?

0

Server