Checking for sounds prints this?

			local Material = Character:WaitForChild("Humanoid").FloorMaterial
			
			if Material then

				if running == false then
					
					if Framework:WaitForChild("FootstepSounds"):WaitForChild("Walking"):WaitForChild(Material):GetChildren() then -- line 312

						local items = Framework:WaitForChild("FootstepSounds"):WaitForChild("Walking"):FindFirstChild(Material):GetChildren()

image

I have never seen anything like this be printed and it has never printed this prior until now.

1 Like

if you have an item called Grass and you are looking for it using an Enum, you have to say Enum.Name, otherwise you are just telling the system to look for Enum.Material.[WhateverMaterial] within Walking’s children.

Also:

This is an incorrect use of :WaitForChild(), and will break your code if the object is not there.

1 Like

completely unrelated, i’m wondering why its printing stuff i’ve never seen until now and not wondering if waitforchild is in its proper use.

1 Like

How so, I explain why its doing that.
It also literally says it in the message

It expects a string, instead it its getting an Enum, thus giving you an error.
UserData can be many things, could be an Instance, EnumValue, essentially everything not in standard lua. Its also the same reason people recommend you use typeof over type.

All thats needed to know is that you are not giving it the correct value/DataType, which I gave a solution to fix it, which you seem to have ignored for appearently being unreleated despite being very much related to your issue.


Yeah, because thats totally the thing I was referring to the whole time.

1 Like

you really could’ve just said this and nothing else.

1 Like

I did, and it states it in the error message.

1 Like

whereof in this message does it include ‘UserData’

1 Like

Sir.

Read your own messages please, it will make your life easier.
I also literally said:

And gave you the solution

you’re just being rude to me.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.