I am making custom character sounds for my game with material walksounds and i got this error on my script. I implemented this script in Roblox’s RbxCharacterSounds script. When ever I run the game i get this error. Please ask questions if your confused what im saying. Thankyou all!
local char = script.Parent.Parent.Character
local Humanoid = char:FindFirstChild("Humanoid")
local walkset = "0"
if Humanoid then
if Humanoid.FloorMaterial == Enum.Material.Grass or Humanoid.FloorMaterial == Enum.Material.LeafyGrass then
walkset = "rbxassetid://"Hiddenforcoppyingpurpose"
end
if Humanoid.FloorMaterial == Enum.Material.Grass or Humanoid.FloorMaterial == Enum.Material.LeafyGrass then
walkset = "rbxassetid://Hiddenforcoppyingpurpose"
end
end
Running = {
SoundId = walkset,
Looped = true,
Pitch = 1.2,
I would suggest putting this script in starter character because in starter player the script will only run once when the player joins the game. Putting it in starter character will have it run each time a character is loaded.
This stopped the error from occuring but the Humanoid doesnt seem to be founded by the script. The thing is that the humanoid is indeed present in the character