"Running is not a valid member of Part"

Let me explain real quick: I want to change the PlaybackSpeed of the running (footstep) sound when the player starts running. However, the sound isn’t recognized by the running script (since I want everyone to hear the sound change), but it works in the LocalScript.

My running script inside the global script:

rp.Events.Run.OnServerEvent:Connect(function(player,action)
	
	local char = player.Character
	local hum = char.Humanoid
	
		local sound = char.HumanoidRootPart.Running
		local soundTween = TweenInfo.new(1, Enum.EasingStyle.Sine,Enum.EasingDirection.In,0,false,0)
		local tweenSound = ts:Create(sound,soundTween,{PlaybackSpeed = 1.5})
	
	if action == "Run" then
		tweenSound:Play()
		hum.WalkSpeed = 8
		hum.JumpPower = 105
		repeat
			speeding = true
			hum.WalkSpeed = hum.WalkSpeed + 1
			wait(0.02)
		until hum.WalkSpeed == 60 + char.Stats.SpeedBoost.Value or speeding == false
	end
	
end)

You can see that the sound is there. The error:

1 Like

You should do it on local script since it will replicate to the server anyways. (The playback speed part)

Or maybe you add a :WaitForChild() instead

The sound is probably in the Humanoid itself, not the HumanoidRootPart. It’s hard to tell when your explorer is pulled out of the window like that, though, since we can’t really see anything.

2 Likes