Script cant find part located in Player.Character

The part most definitely exists, see screenshots attached.
Screenshot 2022-02-15 162019
Screenshot 2022-02-15 163721

I’ve also tried using

Character:WaitForChild("Right Hand")

but I get an infinite yield.

Here’s is the code that checks for the Right Hand model, located in ServerScriptService:

game.ReplicatedStorage.CharSelected.OnServerEvent:Connect(function(player, cname)
	cName = cname
	Character = player.Character
end)

game.ReplicatedStorage.LeoKatana.OnServerEvent:Connect(function()
	Character.Archivable = true
	-- tool handling code
	if cName == "Leonardo" then
		print("Leonardo Chosen")
		--create a fake arm
		local FakeArm = Character.Torso:FindFirstChild('Right Arm')
		if not FakeArm then
			local FakeShoulder = Instance.new('Motor6D', Character.Torso)
			FakeShoulder.Part0 = Character.Torso
			FakeShoulder.Name = 'Right Shoulder'
			FakeArm = Instance.new('Part', Character.Torso)
			FakeArm.CanCollide = false
			FakeArm.Transparency = 1
			FakeArm.Name = 'Right Arm'
			FakeArm.FormFactor = 'Custom'
			FakeArm.Size = Vector3.new(0.5, 0.5, 0.5)
			FakeShoulder.Part1 = FakeArm
		end
		local RightHand = Character["Right Hand"]
		print("Right Hand found")
		local RightMotor = Instance.new('Motor6D')
			RightMotor.Parent = Character['Right Hand']
			RightMotor.Part0 = Character['Right Hand']
			RightMotor.C0 = CFrame.new()
			RightMotor.C1 = CFrame.new()
		end

I’m using a RemoteEvent to, once a character is selected, pass the Player’s name as a parameter, as well as CharacterName, a StringValue located inside the player.

If more details are needed, let me know.

Knowing me, it’s probably a very simple solution but I can’t figure it out for the life of me.

Thanks!

game.ReplicatedStorage.CharSelected.OnServerEvent:Connect(function(player, cname)
	--cName = cname
	--Character = player.Character
--currently disabled because I don't know if there was more code above this
end)

game.ReplicatedStorage.LeoKatana.OnServerEvent:Connect(function(...) --require Attributes
	local atts = {...}
	local char = atts[2]
	local cName = atts[3]
	
	char.Archivable = true
	-- tool handling code
	if cName == "Leonardo" then
		print("Leonardo Chosen")
		--create a fake arm
		local FakeArm = char.Torso:FindFirstChild('Right Arm')
		if not FakeArm then
			local FakeShoulder = Instance.new('Motor6D', char.Torso)
			FakeShoulder.Part0 = char.Torso
			FakeShoulder.Name = 'Right Shoulder'
			FakeArm = Instance.new('Part', char.Torso)
			FakeArm.CanCollide = false
			FakeArm.Transparency = 1
			FakeArm.Name = 'Right Arm'
			FakeArm.FormFactor = 'Custom'
			FakeArm.Size = Vector3.new(0.5, 0.5, 0.5)
			FakeShoulder.Part1 = FakeArm
		end
		local RightHand = char:FindFirstChild("Right Hand")
		print("Right Hand found")
		local RightMotor = Instance.new('Motor6D')
			RightMotor.Parent = RightHand 
			RightMotor.Part0 = RightHand 
			RightMotor.C0 = CFrame.new()
			RightMotor.C1 = CFrame.new()
		end

try with this

Is that “Right Hand” BasePart being instanced by the client? If so then its existence won’t be replicated to the server and thus from the server’s perspective no such instance named “Right Hand” exists.

The Right Hand part already exists in a model, the model is just being moved to Workspace and becoming the player.Character.

Where is it being moved from and is a local script moving it?

It’s being moved from game.Lighting, and no, it’s being moved via a ServerScript.

And it definitely works too, because when changing from Client to Server while testing, it shows that Right Hand is parented to the player.Character.

Unfortunately that returns char as nil.

Found a solution. For some reason it wouldn’t detect Right Hand in the playermodel until I passed the playername as a parameter through the LeoKatana RemoteEvent and used game.Workspace[PlayerName] to locate the player’s model.