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)
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.
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!