Here is the script. I don't know where to put it (in witch folder and witch kind of script).
local plr = game.Players.LocalPlayer
local char = plr.Character
local hum = char:WaitForChild("Humanoid")
local UserInputService = game:GetService("UserInputService")
local leftWalk = Instance.new("Animation")
leftWalk.AnimationId = "rbxassetid://6046738829"
local rightWalk = Instance.new("Animation")
rightWalk.AnimationId = "rbxassetid://6046765944"
hum:LoadAnimation(leftWalk)
hum:LoadAnimation(rightWalk)
UserInputService.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.D then
print("Going Right")
rightWalk:Play()
elseif input.KeyCode == Enum.KeyCode.A then
print("Going Left")
leftWalk:Play()
end
end)
UserInputService.InputEnded:Connect(function(input)
if input.KeyCode == Enum.KeyCode.D then
print("Animation Stop")
rightWalk:Stop()
elseif input.KeyCode == Enum.KeyCode.A then
print("Animation Stop")
leftWalk:Stop()
end
end)

5 comments
If you don't know then you don't know what it does or how it does it.Start small and learn how to make thes kind of scripts yourself and you'll know
we know how it works but not where to put it
You can't know how it does what it does. Then you would know that it has to be a LocalScript because of the use of LocalPlayer
i know it was a localscript but not where to put it. Startercharacter mabye??
this is a site where people help each other, if you have mental illness.. unfortunately we cant help you here spjureeedd