Animation script

I’ve been working for the past 2 days to try to get an animation script working and im calling for help for someone to implement a animation script in my run script.

local UIS = game:GetService("UserInputService")

local player = game.Players.LocalPlayer

local walkSpeed = 20 --Change walk speed value here
local sprintSpeed = 32 --Change sprint speed value here

UIS.InputBegan:Connect(function(input, gameProccessedEvent)
	if input.KeyCode == Enum.KeyCode.LeftShift then
		player.Character.Humanoid.WalkSpeed = sprintSpeed
		for i = 1,5 do
			game.Workspace.CurrentCamera.FieldOfView = (90+(i*2)) -- change the 90 into a bigger number if you want bigger FOV or smaller if you want smaller FOV 
			wait()
		end
	end
end)

UIS.InputEnded:Connect(function(input, gameProccessedEvent)
	if input.KeyCode == Enum.KeyCode.LeftShift then
		player.Character.Humanoid.WalkSpeed = walkSpeed
		for i = 1,5 do
			game.Workspace.CurrentCamera.FieldOfView = (100-(i*2)) -- change the 100 into your number for the previus FOV change and add ten so your number + 10
			wait()
		end
	end
end)
1 Like

I’m confused, what is the problem?

1 Like

sorry, im really new to dev forum. Is this the wrong category? Cause I was just requesting someone add a script to this script so I can get a run script working for it. I’ve been working on it for so long and I literally have no idea how to do it.

I mean a run animation working in the run script, my bad

I’ve been trying to put something in the script to get my custom r6 run animation to play

I’m honestly not completely sure how to do run animations, but you could watch this for help

2 Likes

It works, thanks a lot. I’ve been working on this forever and realizing that I think I


've seen this video before and thought it was just a tutorial teaching how to make animations makes me feel really dumb. I’m new to this whole thing and I’m so grateful for your help. Thanks!

i dont think I recorded it correctly, but it works

I’m glad I could help! (Sorry that I didn’t have the info to help you personally though)

It’s okay, I’ve been working on this for way longer than I should have and I’m so glad that someone helped me.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.