game.StarterPlayer.EnableMouseLockOption = false local UserInpServ = game:GetService('UserInputService') local ReplicatedStorage = game:GetService('ReplicatedStorage') UserInpServ.InputBegan:Connect(function(Input) if Input.KeyCode == Enum.KeyCode.LeftShift then game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 99 end if Input.KeyCode == Enum.KeyCode.Q then game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 5 else if Input.KeyCode == Enum.KeyCode.Q then game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 15 end end) UserInpServ.InputEnded:Connect(function(Input) if Input.KeyCode == Enum.KeyCode.LeftShift then game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 15 end end)
You added a space in between else
and if
, which looks like you have an extra if
statement. Thus, the error you have is expecting an end
. The correct keyword is elseif
, not else if
.