Trying to create a simple sprinting system

--StarterCharacterScripts
local UIS = game:GetService("UserInputService")

local Speed = script.Parent:WaitForChild("Humanoid").WalkSpeed

UIS.InputBegan:Connect(function(Input)
	if Input.KeyCode == Enum.KeyCode.LeftShift then
		Speed = 25
	end
end)
UIS.InputEnded:Connect(function(Input)
	if Input.KeyCode == Enum.KeyCode.LeftShift then
		Speed = 16
	end
end)

I don’t get any errors in the console and the script doesn’t do anything.

Haven’t tested the code, but it looks like you are saving the Humanoid.WalkSpeed value rather than the WalkSpeed property itself.

Try changing:

for

local Speed = script.Parent:WaitForChild("Humanoid")

--And then later on the code
Speed.WalkSpeed = 25