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

In-Game 1.0 body help???

I want my game to have all players in 1.0 body, but I don't really know where to start looking...

Mainly what I'm asking is for help on how to change the players Packages to the Roblox 1.0 body as soon as they enter the game? Please help I will thank you so much

1 comment

0

Check edit on answer. Post comment on my answer when you see it.

1 answer

✓ Accepted answer

This is the EXACT code I've used in one of my games before. I only added comments to make it easier to understand what's going on.

-- I recommend making the CharacterAutoLoads false:
game.Players.CharacterAutoLoads = false

game.Players.PlayerAdded:connect(function(player)
	local function checkChild(child)
		if child:isA("CharacterMesh") then -- This is the mesh of the body packages. They are added directly to the character.
			repeat wait() until child.Parent -- What happens is it's trying to remove the child before it actually has a parent, so we need to wait for it. For some reason, the ChildAdded fires before the child really gets added.
			child:remove()
		end
	end

	local function characterSpawned(character)
		for _, child in pairs(character:children()) do
			checkChild(child)
		end

		character.ChildAdded:connect(checkChild) -- When the player first joins, the meshes sometimes take a little time to load. This makes sure none are left out.

		character:WaitForChild("Humanoid").Died:connect(function() -- Handles respawning. Not important to what you are doing.
			wait(5)
			player:LoadCharacter()
		end)
	end

	player.CharacterAdded:connect(characterSpawned)
	
	wait() -- For some reason, if we load their character instantly, their character doesn't load with their cloting, etc.. So we need to give it a chance to load the avatar asset.
	player:LoadCharacter() -- Loads the character and fires the CharacterAdded event.
end)

4 comments

0

This goes in LocalScript in Explorer or Players? And thank you Its of good help :)

0

I placed it in a script in explorer and it worked in Roblox Studio but not in the game and also when i tested it in play solo after the first death i would have my same package not the 1.0 help me please :(

0

I am sorry, I will fix that. Also, it should be a regular script in the ServerScriptService or Workspace.

0

Thanks so much :)

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