How do you find the client's character in a server script?
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:
01 | game.ReplicatedStorage.GiveStand.OnServerEvent:Connect( function (player) |
02 | local playerStand = player.Character:Clone() |
04 | playerStand:WaitForChild( "Left Arm" ).Postition = player.Character:WaitForChild( "LeftArm" ) |
05 | playerStand:WaitForChild( "Right Arm" ).Postition = player.Character:WaitForChild( "Right Arm" ) |
06 | playerStand:WaitForChild( "Left Leg" ).Postition = player.Character:WaitForChild( "Left Leg" ) |
07 | playerStand:WaitForChild( "Right Leg" ).Postition = player.Character:WaitForChild( "Right Leg" ) |
08 | playerStand:WaitForChild( "Head" ).Postition = player.Character:WaitForChild( "Head" ) |
09 | playerStand:WaitForChild( "Torso" ).Postition = player.Character:WaitForChild( "Torso" ) |
10 | playerStand:WaitForChild( "HumanoidRootPart" ).Postition = player.Character:WaitForChild( "HumanoidRootPart" ) |
11 | playerStand:WaitForChild( "Torso" ).Orentation = player.Character:WaitForChild( "Torso" ) |
12 | playerStand:WaitForChild( "Left Arm" ).Orentation = player.Character:WaitForChild( "Left Arm" ) |
13 | playerStand:WaitForChild( "Left Leg" ).Orentation = player.Character:WaitForChild( "Left Leg" ) |
14 | playerStand:WaitForChild( "Right Arm" ).Orentation = player.Character:WaitForChild( "Right Arm" ) |
15 | playerStand:WaitForChild( "Right Leg" ).Orentation = player.Character:WaitForChild( "Right Leg" ) |
16 | playerStand:WaitForChild( "HumanoidRootPart" ).Orentation = player.Character:WaitForChild( "HumanoidRootPart" ) |
17 | playerStand:WaitForChild( "Head" ).Orentation = player.Character:WaitForChild( "Head" ) |