as you can see, I am selecting the item thats supposed to be obtaind by the waiforchild, yet its just not finding it. Note that the item is indeed under humanoid root part, so I dont udnerstand why its not being found.
elseif cmd == "!unfly" then
local char = effectedPlr.Character
if char and char:FindFirstChild("flyHandler") then
print("aaa")
char:FindFirstChild("flyHandler").Enabled = false
char:FindFirstChild("flyHandler"):Destroy()
local hrp = char:FindFirstChild("HumanoidRootPart")
print(hrp)
print(hrp:WaitForChild("BodyVel"))
if hrp:FindFirstChild("BodyVel") then
hrp:FindFirstChild("BodyVel"):Destroy()
print("eee")
end
if hrp:FindFirstChild("BodyPosition") then
hrp:FindFirstChild("BodyPosition"):Destroy()
end
end
end
thats the segment of my program thats responsible for finding the child. This is supposed to be part of an admin cmd script, which removes the flight script from the player and then remove the body velocity and body position from the player to avoid the player from floating