I want the MoveDirection to change the 2d sprite of a character but for some reason when I run the script in play mode it doesn't do anything.

Player = game.Players.LocalPlayer
Humanoid = Player.Character:WaitForChild("Humanoid")
Sprite = Player.Character.Sprite

--Go go power rangers!
if Humanoid.MoveDirection == Vector3.new(1,0,0) then
	while true do
		wait(0.5)
		Player.Character.Head.WalkSound:Play()
		Sprite.SpriteUpWalk.Visible = true 
	end
end

2 comments

0

You don't need == true

0

whoops. it still didn't fix the script