Keep on getting the error: "Bad Cast"

I keep on getting the bad cast and I don’t know why?

Remote.OnServerEvent:Connect(function(player, Charged, ChargedTime)
local Character = game.Workspace:WaitForChild(player.Name)
print("Recived")
--Click (MouseButton1)
if Charged == false then
	local WeldHandle = Instance.new("Weld")
	local WeldBlade = Instance.new("Weld")
	local Knife = ReplicatedStorage.Knife:Clone()
	Knife.Blade.Parent = Character
	Knife.Handle.Parent = Character
	WeldHandle.Parent = Character.RightHand
	wait(0.01)
	WeldHandle.Part0 = WeldHandle
	WeldHandle.Part1 = Character.RightHand
end

end)

1 Like

You are setting WeldHandle’s Part0 to itself instead of another part. I assume that you want to set it to Knife.Handle?

2 Likes

I believe this is your issue, you’re setting the Weld’s Part0 to a weld (itself), when it should be a BasePart.

Also, whats the purpose of this wait()? Its below the minimum so you can leave the time argument blank.