HumanoidRootPart is not a valid member of Model "StarterCharacter"

Currently have been working on a “Spinjitzu” inspired tool from “Ninjago”, and have recently come across some bugs.

  1. Since this script is using load character() after being used, it deletes all of the inventory so I had to create my own way of using tables to save it. Example →
    local equippedTool = plr.Character:FindFirstChildWhichIsA("Tool")

	if equippedTool then
		local newTool = equippedTool:Clone()
		newTool.Parent = plr.Backpack
	end

	if plr:FindFirstChild("Backpack") then
		for i,v in pairs(plr.Backpack:GetChildren()) do
			if v:IsA("Tool") then
				table.insert(Tools, v:Clone())
			end
		end
	end
	

Then of course when the spinning is over →

if plr:FindFirstChild("Backpack") then
		for i,v in pairs(Tools) do
			local tool = v:Clone()
			tool.Parent = plr.Backpack
		end
	end
	
	table.clear(Tools)

What I’m encountering now because of this

When I’m encountering it → Pretty much right when I use the tool, and fall of into the void or basically die from something. (while still in ability)

What I tried adding
image

Still does nothing…

What i’m wondering…

I have basically made this tool that sends an event when you activate it to server →
image

Although, now that I have come across the issues of giving tools to the player. I don’t know why the server is not receiving the humanoidRootpart.

Keep in mind :

image

I’m basically using a custom character, to display the spinjitzu, so that’s why we use a new model/startercharacter. Then we load their normal player after? Which I believe could be causing the problem?

Also →

image

Very confused.

Is the client giving themselves the tools?

They are using a “Giver” like in a tycoon.

It’s a server script, handling from a proximity prompt.

what happens is that you have to wait for the character to be added put a wait or a characteradded

In addition, you should use the waitforchild rather it is in the character, not for the humanoidrootpart when the character is replicated, everything else also at the same time, mainly the humanoidrootpart


if plr.Character and plr.Character:FindFirstChild("HumanoidRootPart") and plr.Character:FindFirstChild("Humanoid").Health > 0 and not plr.Character:FindFirstChild("RightHand") then
		plr:LoadCharacter()
		plr.Character.HumanoidRootPart.CFrame = newModel.HumanoidRootPart.CFrame
		plr.Character.Humanoid.Health = 100
		plr.Character.Humanoid.WalkSpeed = 16
	end

This seems to fix it!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.