Hello, I was using the Changed event on the Humanoid of my player to print out what is changing as I move
humanoid.Changed:connect(function(property) print(property) end)
and my output returns: "MoveDirection" "MoveDirectionInternal"
However, when I use the following code to print out the values of all properties changed:
humanoid.Changed:connect(function(property) print(humanoid[property]) end)
My output returns: "0, 0, -1" "MoveDirectionInternal is not a valid member of Humanoid"
I was wondering why this happens and if there are ways to print Internal values or skip over them?
The 'property' parameter is the property that was changed, not the value is was changed to.
Take this code for example:
Code:
```lua local Part = Instance.new("Part") Part.Parent = workspace
Part.Changed:Connect(function(Property) print("Name of property: "..Property) print("New value of property: "..Part[Property]) end
wait()
Part.Name = "I changed this property" ```
Output:
--> Name of property: Name
--> New value of property: I changed this property
Source: Instance.Changed
Hope this helps.
Patch