Humanoid is not a valid member of RBXScriptSignal

Hello, my name is Bryan and I’m having problems making a system of footsteps, every time I run my place, an error appears saying "Humanoid is not a valid member of RBXScriptSignal - Client - LocalScript:3"

I’m desperate, because I’ve been trying to fix this for three hours, and I’ve looked for solutions on youtube, devforum and other sites, but I haven’t found anything that helps me

I already tried to use functions like “WaitForChild”, “FindFirstChild”, but nothing worked, if anyone knows the problem, please let me know

Here’s the script:

local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded
local human = char.Humanoid or char:WaitForChild("Humanoid")
local hrp = char.HumanoidRootPart or char:WaitForChild("HumanoidRootPart")
local sound = hrp.Running or hrp:WaitForChild("Running")

sound.PlaybackSpeed = 1

local footsteps = require(game:GetService("ReplicatedStorage").FootstepModule)

human.Running:Connect(function(speed)
	if speed >= 5 then
		local randomSound = footsteps:GetFootstepSound(human.FloorMaterial)
		
		if randomSound then
			sound.SoundId = randomSound
		end
	end
end)
1 Like

Hi Byran, I tested your code, and I got the same error.
I changed a few things and I got it to work:

local player = game.Players.LocalPlayer
local char = player.CharacterAdded:Wait()
local human = char:WaitForChild("Humanoid")

I believe the problem was your unnecessary use of the or operator.

4 Likes