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

When a player joins, can I clone and import their avatar into a position?

When a player joins my game, I want a clone of their avatar to be put into a sitting animation in a spot, preferably I just want a script where I am able to have a player join my game, have their avatar (including accessories) cloned into a position I set for them. I wish I knew if this was easier! I'd just like to be able to make a rig for a ragdoll and clone it in the position. Sorry if this sounds repetitive, there's just a lot to say which usually loops back. Sorry if this sounds like too much for you, I thought HumanoidDescription would help but I haven't made any good progress. Can someone point me in the right direction, I can't find anything like this asked for.

1 comment

0

clone = player.Character:Clone() and then clone:MoveTo(putVector3valuehere)

1 answer

alreadyput means when a player is already at the position then the next player is at the next position

local alreadyput = 0

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		for i,plr in pairs(game.Players:GetChildren()) do
			local plrclone = plr:Clone()
			plrclone:moveTo(Vector3.new(thepositionhere)
			alreadyput = 1
			if alreadyput == 1 then
			local plrclone = plr:Clone()
			plrclone:moveTo(Vector3.new(thepositionhere)
			alreadyput = 2
			elseif alreadyput == 2 then
			local plrclone = plr:Clone()
			plrclone:moveTo(Vector3.new(thepositionhere)
			alreadyput = 3
			-- and so on
			end
		end
	end)
end)

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