Help with MoveDirection

Hello!

So basically here I am stuck on this for 2 days now, and I can’t figure it out.


Here are some screenshots :

image
So basically here I created a value inside the character which works really well.
But then, I tried to change the value of it to true when the player moves. But it didn’t work at all. Why?

Here is the code that makes the value to true when MoveDirection is 0,0,0.


Any help is appreciated, thanks!

You are not changing the value of boolValue object, instead you are changing the variable itself to true
Basically you missed .Value in IsMoving = true

Don’t worry about that, the .Value is already in the variable

And I actually didn’t realise it wasn’t the same as the other line lol thanks

IF that code is ran in a local script only the client will have access to the changed value. To make the server know that a certain character is moving you should use a RemoteEvent so the server can edit the BoolValue and then retrieve it if needed

first off, why comic sans also second:

local Character = script.Parent

local IsMoving = Instance.new("BoolValue")

IsMoving.Name = "IsMoving"

IsMoving.Parent  = Character
Character.Humanoid.MoveDirection:GetPropertySignalChanged("MoveDirection"):Connect(function()

if Character.Humanoid.MoveDirection == Vector3.New(0, 0, 0) then
IsMoving.Value = false
else
IsMoving.Value = true

end
end)

LocalScript in StarterCharacterScripts Please.

also i typed it on mobile so formatting might be off.

Excuse me but someone already solved the problem

and why comic sans? Because I want to?

There’s a missing .Value at the second IsMoving.

Doing this with .Magnitude may make it better and you forgot to add .Value to “IsMoving”