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

Why is this code from the wiki crashing my game?

game.Players.PlayerAdded:connect(function(Player)
    Player.CharacterAppearance = "http://www.roblox.com/Asset/CharacterFetch.ashx?userId=23749623" 
end)

copied straight from the wiki to test it out, and it crashes the game online. i made a test site that was empty except for a server script in ServerScriptService with the above code pasted into it. I published it and joined the game, and the server shuts down. Is CharacterAppearance not turned on? Does anyone else use this, and can you tell me how to use it please.

1 answer

Are there any other scripts in the game? What does the dev console say?

game.Players.PlayerAdded:connect(function(player)
	player.CharacterAdded:connect(function(char)
		if shirt = char:findFirstChild("Shirt") then -- This might be wrong, haven't coded for a while
			shirt.ShirtImage = "(I forgot how to do asset IDs)"
		else
			local sp = Instance.new("Shirt", char)
			sp.ShirtImage = "(I still haven't remembered how to do asset IDs)"
			end
		end)
end)

1 comment

0

Repeat that for pants

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