------------------------------- --random name math.randomseed(os.time()) for i = 1,157 do local name = math.random() script.Name = name end --so hackers cant delete the script -------------------------------- local plr = game.Players.LocalPlayer local bp = plr.Backpack local char = plr.Character --Fly char.HumanoidRootPart.ChildAdded:connect(function(l) if l.ClassName ~= "BodyGyro" then plr:Kick("Fly Hacking") end end) char.UpperTorso.ChildAdded:connect(function(l) if l.ClassName ~= "BodyGyro" then plr:Kick("Fly Hacking") end end) char.LowerTorso.ChildAdded:connect(function(l) if l.ClassName ~= "BodyGyro" then plr:Kick("Fly Hacking") end end)
This script was to kick players who are fly hacking, but I keep getting "HumanoidRootPart is not in model" in console? Any fixes?
It is often useful to wait for some parts
local hum = player.Character:WaitForChild("HumanoidRootPart")
Creating a starting variable like this will often solve the problem