I try to make a commanding model, but it doesn't seem to get the model's Humanoid.\
local rp = game:GetService("ReplicatedStorage")
local remote = rp:FindFirstChild("Z")
remote.OnServerEvent:Connect(function(player, val, Mouse)
if val == "CommandZombie" then
local Zombiepet = workspace:GetChildren(player.Name.."'s Pet")
local zomNoid = Zombiepet:FindFirstChild("HumanoidRootPart")
print(("ZOmbieeeeeee"))
if Zombiepet and zomNoid then
print(("ZOmbie"))
local bodyposition = Instance.new("BodyPosition")
bodyposition.Parent = zomNoid
bodyposition.MaxForce = Vector3.new(10000,10000,10000)
Zombiepet.Position = Mouse
game.Debris:AddItem(bodyposition, 4)
end
end
end)

1 comment
GetChildren() doesn't have parameters and returns a table. You can give it anything you want and it won't matter, because there are no parameters to give arguments to; GetChildren() will still give you a table of every child under Workspace. Either use FindFirstChild()/WaitForChild() or loop through the existing table.