this is my script, its supposed to make the enemyhumanoid walkspeed and jumppower 0 but it isnt working
Hitbox.Touched:Connect(function(Hit)
if Hit:IsA("Part") or Hit:IsA("MeshPart") then
if Hit.Parent ~= Character then
local EHumanoid = Hit.Parent:FindFirstChild("Humanoid")
local EHumRP = Hit.Parent:FindFirstChild("HumanoidRootPart")
EHumanoid.WalkSpeed = 16
EHumanoid.JumpPower = 50
thank you for your time

3 comments
or check (if EHumanoid then)
^
^