So i have walkingsounds that align with what your walking on, and theres no real water material so i made a materialvarient but its not really understanding and I dont know much about materialvarients either.
local function getFloorMaterial()
floorMaterial = humanoid.FloorMaterial
if floorMaterial.MaterialVarient == "WaterSounds" then
material = string.split(tostring(floorMaterial), "Enum.Material.")[2].MaterialVarient
else
material = string.split(tostring(floorMaterial), "Enum.Material.")[2]
return material
end
end
You will likely need to use the MaterialVariant property of the part that the player is currently walking on.
This property is not a part of the Material property (you can’t do Material.MaterialVariant) so instead, could try to use a RayCast going towards the ground from the character’s HumanoidRootPart and getting the MaterialVariant property of the part below the character.