I'm trying to make a "jojo-ish" game where you have a ghost/stand that lots behind you, except it's your avatar. Is there a way to find and clone a character with a server script?

half the script is making the limbs in the same location as your character

I know I'm doing this wrong so maybe could someone help steer me in the right direction?

Script:

game.ReplicatedStorage.GiveStand.OnServerEvent:Connect(function(player)
local playerStand =	player.Character:Clone()
	while true do
		playerStand:WaitForChild("Left Arm").Postition = player.Character:WaitForChild("LeftArm")
		playerStand:WaitForChild("Right Arm").Postition = player.Character:WaitForChild("Right Arm")
		playerStand:WaitForChild("Left Leg").Postition = player.Character:WaitForChild("Left Leg")
		playerStand:WaitForChild("Right Leg").Postition = player.Character:WaitForChild("Right Leg")
		playerStand:WaitForChild("Head").Postition = player.Character:WaitForChild("Head")
		playerStand:WaitForChild("Torso").Postition = player.Character:WaitForChild("Torso")
		playerStand:WaitForChild("HumanoidRootPart").Postition = player.Character:WaitForChild("HumanoidRootPart")
		playerStand:WaitForChild("Torso").Orentation = player.Character:WaitForChild("Torso")
		playerStand:WaitForChild("Left Arm").Orentation = player.Character:WaitForChild("Left Arm")
		playerStand:WaitForChild("Left Leg").Orentation = player.Character:WaitForChild("Left Leg")
		playerStand:WaitForChild("Right Arm").Orentation = player.Character:WaitForChild("Right Arm")
		playerStand:WaitForChild("Right Leg").Orentation = player.Character:WaitForChild("Right Leg")
		playerStand:WaitForChild("HumanoidRootPart").Orentation = player.Character:WaitForChild("HumanoidRootPart")
		playerStand:WaitForChild("Head").Orentation = player.Character:WaitForChild("Head")
	end
 end)

3 comments

0

Your script is very inefficient, please use a for loop getchidren.

0

That's not what I was asking but okay.

0

I don't understand what you're doing in the while loop. And what is "Postition" and "Orentation"?